checking for C++ compiler default output... configure: error: C++ compiler cannot create executable
来源:互联网 发布:淘宝企业店铺经营类型 编辑:程序博客网 时间:2024/06/11 01:34
今天编译一个C++程序遇到问题如下:
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for gawk... gawk
checking whether make sets ${MAKE}... yes
checking for g++... no
checking for c++... no
checking for gpp... no
checking for aCC... no
checking for CC... no
checking for cxx... no
checking for cc++... no
checking for cl... no
checking for FCC... no
checking for KCC... no
checking for RCC... no
checking for xlC_r... no
checking for xlC... no
checking for C++ compiler default output... configure: error: C++ compiler cannot create executable
检查config.log,发现错误如下
g++: command not found
于是,通过yum list命令查找g++的包:
[root@localhost tahoe]# yum list | grep c++
libstdc++.i386 4.1.2-51.el5 installed
ImageMagick-c++.i386 6.2.8.0-15.el5_8 base
ImageMagick-c++-devel.i386 6.2.8.0-15.el5_8 base
compat-gcc-34-c++.i386 3.4.6-4.1 base
compat-libstdc++-296.i386 2.96-138 base
compat-libstdc++-33.i386 3.2.3-61 base
gcc-c++.i386 4.1.2-54.el5 base
gcc-objc++.i386 4.1.2-54.el5 base
gcc44-c++.i386 4.4.7-1.el5 base
libstdc++.i386 4.1.2-54.el5 base
libstdc++-devel.i386 4.1.2-54.el5 base
libstdc++44-devel.i386 4.4.7-1.el5 base
xmlrpc-c-c++.i386 1.16.24-1206.1840.4.el5 base
通过yum命令安装
[root@localhost]# yum install gcc-c++.i386
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: mirror.usonyx.net
* extras: mirror.usonyx.net
* updates: ftp.swin.edu.au
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package gcc-c++.i386 0:4.1.2-54.el5 set to be updated
--> Processing Dependency: libstdc++ = 4.1.2-54.el5 for package: gcc-c++
--> Processing Dependency: libstdc++-devel = 4.1.2-54.el5 for package: gcc-c++
--> Running transaction check
---> Package libstdc++.i386 0:4.1.2-54.el5 set to be updated
---> Package libstdc++-devel.i386 0:4.1.2-54.el5 set to be updated
updates/filelists_db | 688 kB 00:00
http://ftp.swin.edu.au/centos/5.9/updates/i386/repodata/filelists.sqlite.bz2: [Errno -1] Metadata file does not match checksum
Trying other mirror.
updates/filelists_db | 688 kB 00:00
http://mirror.colocity.com/centos/5.9/updates/i386/repodata/filelists.sqlite.bz2: [Errno -1] Metadata file does not match checksum
Trying other mirror.
updates/filelists_db | 688 kB 00:00
http://mirror.usonyx.net/Linux/CentOS/5.9/updates/i386/repodata/filelists.sqlite.bz2: [Errno -1] Metadata file does not match checksum
Trying other mirror.
updates/filelists_db | 688 kB 00:00
http://centos.biz.net.id/5.9/updates/i386/repodata/filelists.sqlite.bz2: [Errno -1] Metadata file does not match checksum
Trying other mirror.
updates/filelists_db | 688 kB 00:00
http://centos.ipserverone.com/centos/5.9/updates/i386/repodata/filelists.sqlite.bz2: [Errno -1] Metadata file does not match checksum
Trying other mirror.
updates/filelists_db | 688 kB 00:00
http://kartolo.sby.datautama.net.id/Centos/5.9/updates/i386/repodata/filelists.sqlite.bz2: [Errno -1] Metadata file does not match checksum
Trying other mirror.
updates/filelists_db | 688 kB 00:00
http://mirror.nus.edu.sg/centos/5.9/updates/i386/repodata/filelists.sqlite.bz2: [Errno -1] Metadata file does not match checksum
Trying other mirror.
updates/filelists_db | 688 kB 00:00
http://ossm.utm.my/centos/5.9/updates/i386/repodata/filelists.sqlite.bz2: [Errno -1] Metadata file does not match checksum
Trying other mirror.
updates/filelists_db | 688 kB 00:00
http://mirror.ventraip.net.au/CentOS/5.9/updates/i386/repodata/filelists.sqlite.bz2: [Errno -1] Metadata file does not match checksum
Trying other mirror.
updates/filelists_db | 688 kB 00:00
http://mirrors.hostemo.com/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.
居然找不到镜像去安装。
于是继续调查,发现可以通过 su -c 'yum clean all' 将yum默认的镜像清除,然后,再通过命令 yum install gcc-c++.i386 安装。
终于按装成功。
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for gawk... gawk
checking whether make sets ${MAKE}... yes
checking for g++... no
checking for c++... no
checking for gpp... no
checking for aCC... no
checking for CC... no
checking for cxx... no
checking for cc++... no
checking for cl... no
checking for FCC... no
checking for KCC... no
checking for RCC... no
checking for xlC_r... no
checking for xlC... no
checking for C++ compiler default output... configure: error: C++ compiler cannot create executable
检查config.log,发现错误如下
g++: command not found
于是,通过yum list命令查找g++的包:
[root@localhost tahoe]# yum list | grep c++
libstdc++.i386 4.1.2-51.el5 installed
ImageMagick-c++.i386 6.2.8.0-15.el5_8 base
ImageMagick-c++-devel.i386 6.2.8.0-15.el5_8 base
compat-gcc-34-c++.i386 3.4.6-4.1 base
compat-libstdc++-296.i386 2.96-138 base
compat-libstdc++-33.i386 3.2.3-61 base
gcc-c++.i386 4.1.2-54.el5 base
gcc-objc++.i386 4.1.2-54.el5 base
gcc44-c++.i386 4.4.7-1.el5 base
libstdc++.i386 4.1.2-54.el5 base
libstdc++-devel.i386 4.1.2-54.el5 base
libstdc++44-devel.i386 4.4.7-1.el5 base
xmlrpc-c-c++.i386 1.16.24-1206.1840.4.el5 base
通过yum命令安装
[root@localhost]# yum install gcc-c++.i386
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: mirror.usonyx.net
* extras: mirror.usonyx.net
* updates: ftp.swin.edu.au
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package gcc-c++.i386 0:4.1.2-54.el5 set to be updated
--> Processing Dependency: libstdc++ = 4.1.2-54.el5 for package: gcc-c++
--> Processing Dependency: libstdc++-devel = 4.1.2-54.el5 for package: gcc-c++
--> Running transaction check
---> Package libstdc++.i386 0:4.1.2-54.el5 set to be updated
---> Package libstdc++-devel.i386 0:4.1.2-54.el5 set to be updated
updates/filelists_db | 688 kB 00:00
http://ftp.swin.edu.au/centos/5.9/updates/i386/repodata/filelists.sqlite.bz2: [Errno -1] Metadata file does not match checksum
Trying other mirror.
updates/filelists_db | 688 kB 00:00
http://mirror.colocity.com/centos/5.9/updates/i386/repodata/filelists.sqlite.bz2: [Errno -1] Metadata file does not match checksum
Trying other mirror.
updates/filelists_db | 688 kB 00:00
http://mirror.usonyx.net/Linux/CentOS/5.9/updates/i386/repodata/filelists.sqlite.bz2: [Errno -1] Metadata file does not match checksum
Trying other mirror.
updates/filelists_db | 688 kB 00:00
http://centos.biz.net.id/5.9/updates/i386/repodata/filelists.sqlite.bz2: [Errno -1] Metadata file does not match checksum
Trying other mirror.
updates/filelists_db | 688 kB 00:00
http://centos.ipserverone.com/centos/5.9/updates/i386/repodata/filelists.sqlite.bz2: [Errno -1] Metadata file does not match checksum
Trying other mirror.
updates/filelists_db | 688 kB 00:00
http://kartolo.sby.datautama.net.id/Centos/5.9/updates/i386/repodata/filelists.sqlite.bz2: [Errno -1] Metadata file does not match checksum
Trying other mirror.
updates/filelists_db | 688 kB 00:00
http://mirror.nus.edu.sg/centos/5.9/updates/i386/repodata/filelists.sqlite.bz2: [Errno -1] Metadata file does not match checksum
Trying other mirror.
updates/filelists_db | 688 kB 00:00
http://ossm.utm.my/centos/5.9/updates/i386/repodata/filelists.sqlite.bz2: [Errno -1] Metadata file does not match checksum
Trying other mirror.
updates/filelists_db | 688 kB 00:00
http://mirror.ventraip.net.au/CentOS/5.9/updates/i386/repodata/filelists.sqlite.bz2: [Errno -1] Metadata file does not match checksum
Trying other mirror.
updates/filelists_db | 688 kB 00:00
http://mirrors.hostemo.com/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.
居然找不到镜像去安装。
于是继续调查,发现可以通过 su -c 'yum clean all' 将yum默认的镜像清除,然后,再通过命令 yum install gcc-c++.i386 安装。
终于按装成功。
- checking for C compiler default output file name... configure: error: C compiler cannot create executables
- checking for C++ compiler default output... configure: error: C++ compiler cannot create executable
- configure: error: C compiler cannot create executables
- configure: error: C compiler cannot create executables
- checking for C++ compiler default output file name... configure: error: C++
- ubuntu错误:configure: error: C compiler cannot create executables
- configure: error: C compiler cannot create executables错误解决
- [Linux] configure: error: C compiler cannot create executables
- configure: error: C compiler cannot create executables错误解决
- configure: error: C compiler cannot create executables错误解决
- 编译问题configure: error: C compiler cannot create executables
- Android中configure: error: C compiler cannot create executables解决方法
- error: C compiler cannot create executables
- configure编译时,出现 configure: error: C compiler cannot create executables错误解决
- C compiler cannot create executables checking whether the C compiler works... no
- C compiler not work ....in configure checking .,..
- configure: error: C++ compiler cannot create executables
- configure: error: C++ compiler cannot create executables
- main(int argc,char *argv[])使用
- 获取未安装的APK图标
- 设计模式学习4--代理模式
- 跟你比起来,大部分人都像笨蛋
- c++ try catch exception
- checking for C++ compiler default output... configure: error: C++ compiler cannot create executable
- 【深入浅出MFC】第一章 Win32 基本程序观念
- 系统吞吐量(TPS)、用户并发量、性能测试概念和公式
- xp系统能上网,ubuntu不能上网解决办法
- gcc main函数
- Windows文件检索之——查询条件
- Linux的shell编程(一)(转)
- 程序员职业规划
- C#序列化