LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 966|回复: 3

[help]C compiler cannot create executables

[复制链接]
发表于 2007-3-7 12:48:42 | 显示全部楼层 |阅读模式
:help
使用emerge -P不慎,系统出大问题了。现在情况是这样。有不少系统重要的包给误删了。现在emerge就出现,
checking for x86_64-pc-linux-gnu-gcc... x86_64-pc-linux-gnu-gcc
checking for C compiler default output file name... configure: error: C compiler cannot create executables

我该怎么办?
我需要下面的这些版本的包。
[ebuild  NS   ] dev-libs/lzo-2.02-r1  USE="-examples" 0 kB
[ebuild  NS   ] dev-libs/glib-1.2.10-r5  USE="-hardened" 0 kB
[ebuild  NS   ] dev-lang/python-2.4.3-r4  USE="berkdb gdbm ipv6 ncurses readline ssl -bootstrap -build -doc -nocxx -tk -ucs2" 0 kB
[ebuild  NS   ] dev-java/java-config-1.3.7  0 kB
[ebuild  NS   ] x11-libs/gtk+-1.2.10-r12  USE="nls -debug" LINGUAS="-az -ca -cs -da -de -el -es -et -eu -fi -fr -ga -gl -hr -hu -it -ja -ko -lt -nl -nn -no -pl -pt -pt_BR -ro -ru -sk -sl -sr -sv -tr -uk -vi" 0 kB
[ebuild  NS   ] app-emulation/emul-linux-x86-java-1.5.0.10  USE="X alsa -nsplugin" 0 kB
[ebuild  NS   ] app-crypt/gnupg-1.9.21  USE="X ldap nls -gpg2-experimental (-selinux) -smartcard" 0 kB
[ebuild  NS   ] dev-java/sun-jdk-1.6.0-r1  USE="X alsa -doc -examples -jce (-nsplugin)" 0 kB
[ebuild  NS   ] x11-libs/qt-3.3.6-r4  USE="cups gif ipv6 opengl -debug -doc -examples (-firebird) -immqt -immqt-bc -mysql -nas -nis -odbc -postgres -sqlite -xinerama" 0 kB

:thank.
发表于 2007-3-7 13:07:53 | 显示全部楼层
try this:
#x86_64-pc-linux-gnu-gcc -v example.c

paste output
回复 支持 反对

使用道具 举报

 楼主| 发表于 2007-3-7 13:32:01 | 显示全部楼层
我搜索了不少帖子,现在好像问题解决了。
我用gcc-config -l列出gcc版本,我里边就一个4。1。1版本,我还是用gcc-config 1再选了一次,然后用fix-gcc-libtools.sh 3。4。6(这个在和4.1.1lib目录在同一个目录下,尽管里边有很少的文件)。然后env-update,source /etc/profile后,sh /etc/make.conf. 奇迹发生了,居然没有问题了,现在可以正常emerge package了。怪。
等完工了,汇报结果。
回复 支持 反对

使用道具 举报

 楼主| 发表于 2007-3-7 13:54:52 | 显示全部楼层
新问题出现了。
x86_64-pc-linux-gnu-g++ -c -pipe -fno-exceptions -Wall -W -march=k8 -pipe -O2 -fno-strict-aliasing -D_REENTRANT -fPIC -DQT_SHARED -DQT_TABLET_SUPPORT -DQT_NO_DEBUG -DQT_THREAD_SUPPORT -DQT_THREAD_SUPPORT -DQT_NO_NIS -D_LARGEFILE_SOURCE -D_LARGE_FILES -D_FILE_OFFSET_BITS=64 -DQT_NO_XINERAMA -DQT_DLOPEN_OPENGL -DQT_BUILTIN_GIF_READER=1 -DQT_NO_STYLE_MAC -DQT_NO_STYLE_AQUA -DQT_NO_STYLE_INTERLACE -DQT_NO_STYLE_WINDOWSXP -DQT_NO_STYLE_COMPACT -DQT_NO_STYLE_POCKETPC -I/var/tmp/portage/x11-libs/qt-3.3.6-r4/work/qt-x11-free-3.3.6/mkspecs/linux-g++ -I. -I/usr/include/freetype2 -I3rdparty/opentype -I../include -I/usr/include -I.moc/release-shared-mt/ -o .obj/release-shared-mt/moc_qhbuttongroup.o .moc/release-shared-mt/moc_qhbuttongroup.cpp
/usr/bin/x86_64-pc-linux-gnu-g++: Exec format error
make[1]: *** [.obj/release-shared-mt/moc_qhbuttongroup.o] Error 1
make[1]: *** Waiting for unfinished jobs....
/usr/bin/x86_64-pc-linux-gnu-g++: Exec format error
make[1]: *** [.obj/release-shared-mt/moc_qgroupbox.o] Error 1
这个g++问题不知道怎么办了?
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表