Ubuntu 11.10 에 Xen 을 설치 후 GuestOS 로 2.6 버전대를 쓰려고 커널 컴파일을 돌렸는데

못보던 에러가 등장.


gcc: error : elf_i386: No such file or directory 
OBJCOPY arch/x86/vdso/vdso32-int80.so
.......
어쩌구 저쩌구.....



봤더니 gcc 버전의 문제였던거 같다. (gcc-4.6.1)

gcc 가 4.6 에서는 linker-style architecture option 을 제공하지 않는다는 참조 사이트의 이야기.


Solution

arch/x86/vdso/Makefile 을 열어서

VDSO_LDFLAGS_vdso.lds 부분에서 옵션이 "-m elf_x86_64" 라고 되어있는 곳을 "-m64" 로 바꾸고
VDSO_LDFLAGS_vdso32.lds 부분에서 옵션이 "-m elf_x86" 라고 되어있는 곳을 "-m32" 라고 바꾸면 된다.

 

 

블로그 : http://rapperkw.tistory.com/150 에서 퍼왔습니다. 문제가 될시 삭제하겠습니다.

장애증상 : 
     - mysql 컴파일시 에러

 

처리로그 :
     ../depcomp: line 512 exec : g++ : not found

 

원인분석 :
     - 위 메세지는 g++ 컴파일러가 없어서 생기는 문제이다.

 

해결방안 :
     - yum 으로 gcc 에 관련된건 다 받아버린다(무식)

     - yum install gcc*

     - 받고나서 소스가 있는 디렉토리에서 make clean 진행

     - 그 이후 다시 컴파일 진행

 

결과 : 
 - 이상없음(설치 완료) 

 

** 참고 **

아래 장애상황과 해결방법은 각 서버의 환경에 따라 다를수 있기때문에 아래 해결방법이 꼭 정답이라고 볼 수없고, 허접스러운 제가 해결하였던 방법이므로, 각자 상황에 맞게 적절히 도움을 받으셨으면 합니다.

 

 

 

yum으로 httpd 를 설치할려고 #yum install httpd 를 입력했다. 그러자 아래와 같은 에러메시지와 함께 install 이 안됨

 

 http://mirrors.neusoft.edu.cn/centos/5.9/updates/i386/repodata/filelists.sqlite.bz2: [Errno -1] Metadata file does not match checksum
Trying other mirror.
Error: failure: repodata/filelists.sqlite.bz2 from updates: [Errno 256] No more mirrors to try.
 You could try using --skip-broken to work around the problem
 You could try running: package-cleanup --problems
                        package-cleanup --dupes
                        rpm -Va --nofiles --nodigest
The program package-cleanup is found in the yum-utils package.

 

## 해결방법 ##

#yum clean all

쳐서 yum 캐시를 지움 그후 yum install httpd 하니깐 정상적으로 install 정보를 받아옴.

 

 

** 참고 **

아래 장애상황과 해결방법은 각 서버의 환경에 따라 장애요인이 다를수 있기때문에 해결방법이 꼭 정답이라고 볼 수없고, 허접스러운 제가 해결하였던 방법이므로, 각자 상황에 맞게 적절히 도움을 받으셨으면 합니다.

 

 

 

[root@localhost httpd-2.2.3]# ./configure --prefix=/usr/local/apache
checking for chosen layout... Apache
checking for working mkdir -p... yes
checking build system type... i686-pc-linux-gnu

 

checking for APR... yes
  setting CC to "gcc"
  setting CPP to "gcc -E"
  setting CFLAGS to " -g -O2 -pthread"
  setting CPPFLAGS to " -DLINUX=2 -D_REENTRANT -D_GNU_SOURCE -D_LARGEFILE64_SOURCE"
  setting LDFLAGS to " "

Configuring Apache Portable Runtime Utility library...

checking for APR-util... reconfig
configure: error: Cannot use an external APR with the bundled APR-util

 

apr-util 문제가 있는것으로 판단되므로, 

#yum install -y apr*

으로 apr에 관련된것을 모두 받았다. 물론 이렇게 되면 필요없는 프로그램까지 받게되었다.

그러나 컴파일은 완료됨.

 

APR 소스 설치 방법

[apr-1.4.2 설치]

 

 #cd /usr/local/src

 wget http://archive.apache.org/dist/apr/apr-1.4.2.tar.gz

tar xvf apr-1.4.2.tar.gz

cd apr-1.4.2

./configure

 

[./configure 시 에러출력]

config.status: executing libtool commands
rm: cannot remove `libtoolT': No such file or directory
config.status: executing default commands
config.status: include/apr.h is unchanged
config.status: include/arch/unix/apr_private.h is unchanged

 

위와같은 에러 출력시 아래처럼 파일을 복사해주고 진행을 계속 해줍니다.

cp -arp libtool libtoolT

./configure

make

 

[make시 에러 출력]

make[1]: Entering directory `/usr/local/src/APM_setup/apr-1.4.2'
/bin/sh /libtool --silent --mode=compile gcc -g -O2 -pthread   -DHAVE_CONFIG_H -DLINUX=2 -D_REENTRANT -D_GNU_SOURCE   -I./include -I/usr/local/src/APM_setup/apr-1.4.2/include/arch/unix -I./include/arch/unix -I/usr/local/src/APM_setup/apr-1.4.2/include/arch/unix -I/usr/local/src/APM_setup/apr-1.4.2/include  -o passwd/apr_getpass.lo -c passwd/apr_getpass.c && touch passwd/apr_getpass.lo
/bin/sh: /libtool: No such file or directory
make[1]: *** [passwd/apr_getpass.lo] Error 127
make[1]: Leaving directory `/usr/local/src/APM_setup/apr-1.4.2'
make: *** [all-recursive] Error 1
 

위와 같은 에러가 나온다면 아래처럼 심볼릭 링크를 걸어주고 진행을 계속 합니다.

# ln -s /usr/bin/libtool /

# make clean

# make

# make install

 

[apr-util-1.4.2 설치]

 

#cd ..

#wget http://archive.apache.org/dist/apr/apr-util-1.3.9.tar.gz

# tar xvzf apr-util-1.3.9.tar.gz
# cd apr-util-1.3.9
# ./configure --with-apr=/usr/local/apr
# make
# make install

 

이글은 http://system.neulwon.com/xe/?mid=linux_os&page=2&document_srl=2472 여기서 도움을 받았습니다.