当前位置: 技术问答>linux和unix
linux centOS yum -y install gcc 安装gcc不成功
来源: 互联网 发布时间:2017-02-09
本文导语: 在centOS上安装mysql结果提示没有g++命令,好像只有gcc命令,就想重新安装gcc,结果还是不成功,具体内容如下: [root@localhost mysql-5.1.33]# yum -y install gcc gcc-c++ autoconf libjpeg libjpeg-devel libpng libpng-devel freetype freet...
在centOS上安装mysql结果提示没有g++命令,好像只有gcc命令,就想重新安装gcc,结果还是不成功,具体内容如下:
[root@localhost mysql-5.1.33]# yum -y install gcc gcc-c++ autoconf libjpeg libjpeg-devel libpng libpng-devel freetype freetype-devel libxml2 libxml2-devel zlib zlib-devel glibc glibc-devel glib2 glib2-devel bzip2 bzip2-devel ncurses ncurses-devel curl curl-devel e2fsprogs e2fsprogs-devel krb5 krb5-devel libidn libidn-devel openssl openssl-devel openldap openldap-devel nss_ldap openldap-clients openldap-servers
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: centos.ustc.edu.cn
* extras: centos.ustc.edu.cn
* updates: centos.ustc.edu.cn
Setting up Install Process
Package gcc-4.1.2-52.el5.i386 already installed and latest version
Package libjpeg-6b-37.i386 already installed and latest version
Package glibc-2.5-81.i686 already installed and latest version
Package glibc-devel-2.5-81.i386 already installed and latest version
Package glib2-2.12.3-4.el5_3.1.i386 already installed and latest version
Package ncurses-5.5-24.20060715.i386 already installed and latest version
No package krb5 available.
Package libidn-0.6.5-1.1.i386 already installed and latest version
Resolving Dependencies
--> Running transaction check
---> Package autoconf.noarch 0:2.59-12 set to be updated
--> Processing Dependency: imake for package: autoconf
---> Package bzip2.i386 0:1.0.3-6.el5_5 set to be updated
---> Package bzip2-devel.i386 0:1.0.3-6.el5_5 set to be updated
---> Package curl.i386 0:7.15.5-15.el5 set to be updated
---> Package curl-devel.i386 0:7.15.5-15.el5 set to be updated
---> Package e2fsprogs.i386 0:1.39-33.el5 set to be updated
--> Processing Dependency: e2fsprogs-libs = 1.39-33.el5 for package: e2fsprogs
---> Package e2fsprogs-devel.i386 0:1.39-33.el5 set to be updated
---> Package freetype.i386 0:2.2.1-28.el5_7.2 set to be updated
---> Package freetype-devel.i386 0:2.2.1-28.el5_7.2 set to be updated
---> Package gcc-c++.i386 0:4.1.2-52.el5 set to be updated
--> Processing Dependency: libstdc++-devel = 4.1.2-52.el5 for package: gcc-c++
--> Processing Dependency: libstdc++ = 4.1.2-52.el5 for package: gcc-c++
---> Package glib2-devel.i386 0:2.12.3-4.el5_3.1 set to be updated
---> Package krb5-devel.i386 0:1.6.1-70.el5 set to be updated
--> Processing Dependency: krb5-libs = 1.6.1-70.el5 for package: krb5-devel
--> Processing Dependency: libselinux-devel for package: krb5-devel
--> Processing Dependency: keyutils-libs-devel for package: krb5-devel
---> Package libidn-devel.i386 0:0.6.5-1.1 set to be updated
---> Package libjpeg-devel.i386 0:6b-37 set to be updated
---> Package libpng.i386 2:1.2.10-15.el5_7 set to be updated
---> Package libpng-devel.i386 2:1.2.10-15.el5_7 set to be updated
---> Package libxml2.i386 0:2.6.26-2.1.15.el5_8.2 set to be updated
---> Package libxml2-devel.i386 0:2.6.26-2.1.15.el5_8.2 set to be updated
---> Package ncurses-devel.i386 0:5.5-24.20060715 set to be updated
---> Package nss_ldap.i386 0:253-49.el5 set to be updated
---> Package openldap.i386 0:2.3.43-25.el5 set to be updated
---> Package openldap-clients.i386 0:2.3.43-25.el5 set to be updated
---> Package openldap-devel.i386 0:2.3.43-25.el5 set to be updated
--> Processing Dependency: cyrus-sasl-devel >= 2.1 for package: openldap-devel
---> Package openldap-servers.i386 0:2.3.43-25.el5 set to be updated
http://mirror.centos.org/centos/5/addons/i386/repodata/filelists.sqlite.bz2: [Errno 4] IOError:
Trying other mirror.
Error: failure: repodata/filelists.sqlite.bz2 from addons: [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.
[root@localhost mysql-5.1.33]#
[root@localhost mysql-5.1.33]# yum -y install gcc gcc-c++ autoconf libjpeg libjpeg-devel libpng libpng-devel freetype freetype-devel libxml2 libxml2-devel zlib zlib-devel glibc glibc-devel glib2 glib2-devel bzip2 bzip2-devel ncurses ncurses-devel curl curl-devel e2fsprogs e2fsprogs-devel krb5 krb5-devel libidn libidn-devel openssl openssl-devel openldap openldap-devel nss_ldap openldap-clients openldap-servers
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: centos.ustc.edu.cn
* extras: centos.ustc.edu.cn
* updates: centos.ustc.edu.cn
Setting up Install Process
Package gcc-4.1.2-52.el5.i386 already installed and latest version
Package libjpeg-6b-37.i386 already installed and latest version
Package glibc-2.5-81.i686 already installed and latest version
Package glibc-devel-2.5-81.i386 already installed and latest version
Package glib2-2.12.3-4.el5_3.1.i386 already installed and latest version
Package ncurses-5.5-24.20060715.i386 already installed and latest version
No package krb5 available.
Package libidn-0.6.5-1.1.i386 already installed and latest version
Resolving Dependencies
--> Running transaction check
---> Package autoconf.noarch 0:2.59-12 set to be updated
--> Processing Dependency: imake for package: autoconf
---> Package bzip2.i386 0:1.0.3-6.el5_5 set to be updated
---> Package bzip2-devel.i386 0:1.0.3-6.el5_5 set to be updated
---> Package curl.i386 0:7.15.5-15.el5 set to be updated
---> Package curl-devel.i386 0:7.15.5-15.el5 set to be updated
---> Package e2fsprogs.i386 0:1.39-33.el5 set to be updated
--> Processing Dependency: e2fsprogs-libs = 1.39-33.el5 for package: e2fsprogs
---> Package e2fsprogs-devel.i386 0:1.39-33.el5 set to be updated
---> Package freetype.i386 0:2.2.1-28.el5_7.2 set to be updated
---> Package freetype-devel.i386 0:2.2.1-28.el5_7.2 set to be updated
---> Package gcc-c++.i386 0:4.1.2-52.el5 set to be updated
--> Processing Dependency: libstdc++-devel = 4.1.2-52.el5 for package: gcc-c++
--> Processing Dependency: libstdc++ = 4.1.2-52.el5 for package: gcc-c++
---> Package glib2-devel.i386 0:2.12.3-4.el5_3.1 set to be updated
---> Package krb5-devel.i386 0:1.6.1-70.el5 set to be updated
--> Processing Dependency: krb5-libs = 1.6.1-70.el5 for package: krb5-devel
--> Processing Dependency: libselinux-devel for package: krb5-devel
--> Processing Dependency: keyutils-libs-devel for package: krb5-devel
---> Package libidn-devel.i386 0:0.6.5-1.1 set to be updated
---> Package libjpeg-devel.i386 0:6b-37 set to be updated
---> Package libpng.i386 2:1.2.10-15.el5_7 set to be updated
---> Package libpng-devel.i386 2:1.2.10-15.el5_7 set to be updated
---> Package libxml2.i386 0:2.6.26-2.1.15.el5_8.2 set to be updated
---> Package libxml2-devel.i386 0:2.6.26-2.1.15.el5_8.2 set to be updated
---> Package ncurses-devel.i386 0:5.5-24.20060715 set to be updated
---> Package nss_ldap.i386 0:253-49.el5 set to be updated
---> Package openldap.i386 0:2.3.43-25.el5 set to be updated
---> Package openldap-clients.i386 0:2.3.43-25.el5 set to be updated
---> Package openldap-devel.i386 0:2.3.43-25.el5 set to be updated
--> Processing Dependency: cyrus-sasl-devel >= 2.1 for package: openldap-devel
---> Package openldap-servers.i386 0:2.3.43-25.el5 set to be updated
http://mirror.centos.org/centos/5/addons/i386/repodata/filelists.sqlite.bz2: [Errno 4] IOError:
Trying other mirror.
Error: failure: repodata/filelists.sqlite.bz2 from addons: [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.
[root@localhost mysql-5.1.33]#
|
看起来是你的每一个软件源都连接失败造成的
推荐用163的源
另外
centos 安装gcc和开发库
yum groupinstall "Development Tools" "Development Libraries"
推荐用163的源
另外
centos 安装gcc和开发库
yum groupinstall "Development Tools" "Development Libraries"