《liNUX入门:linux RedHat无法安装软件问题(No package gcc available. nothing to do)》要点:
本文介绍了liNUX入门:linux RedHat无法安装软件问题(No package gcc available. nothing to do),希望对您有用。如果有疑问,可以联系我们。
在一个新的RedHat linux服务器上安装Nginx的时候,命令都不能解析,缺少gcc编纂器,安装gcc的命令也出错.
[root@localhost ~]# yum -y install gccLoaded plugins: katello,product-ID,security,subscription-managerUpdating certificate-based repositorIEs.Unable to read consumer IDentitySetting up Install ProcessNo package gcc available.nothing to do
没有gcc的软件包的,
最终找到一个解决方法
反省版本:
[root@localhost ~]# cat /etc/issueRed Hat Enterprise linux Server release 5.7 (Tikanga)Kernel \r on an \m
办理过程:
1.下载163安装源
[root@localhost~]# wget http://mirrors.163.com/.help/CentOS5-Base-163.repo--2015-10-09 14:33:10-- http://mirrors.163.com/.help/CentOS5-Base-163.repoResolving mirrors.163.com... 123.58.173.186,123.58.173.185Connecting to mirrors.163.com|123.58.173.186|:80...connected.http request sent,awaiting response... 200 OKLength: 2341 (2.3K) [application/octet-stream]Saving to: `CentOS5-Base-163.repo' 100%2,341 --.-K/s in 0s 2015-10-09 14:33:22 (108 MB/s) -`CentOS5-Base-163.repo' saved [2341/2341]
2.改动repo文件(根据红帽版本)
[root@localhost~]# mv CentOS5-Base-163.repo /etc/yum.repos.d/
*** 把$releasever替换成5 (红帽6版本以上的改为6)[root@localhost yum.repos.d]# sed -i 's#$releasever#5#g' ./CentOS5-Base-163.repo
3.肃清原有缓存
[root@localhost yum.repos.d]# yum clean allLoaded plugins: katello,subscription-managerUpdating certificate-based repositorIEs.Unable to read consumer IDentityCleaning up Everything
4.获取yum列表
[root@localhost yum.repos.d]# yum makecacheLoaded plugins: katello,subscription-managerUpdating certificate-based repositorIEs.Unable to read consumer IDentityaddons | 1.9 kB 00:00 addons/fileLists_db | 570 B 00:00 addons/other_db | 554 B 00:00 addons/primary_db | 1.1 kB 00:00 base | 1.1 kB 00:00 base/fileLists | 3.7 MB 00:11 base/other | 14 MB 01:04 base/group | 1.1 MB 00:03 base/primary | 1.3 MB 00:06 epel | 3.6 kB 00:00 epel/fileLists_db | 4.1 MB 00:16 epel/updateinfo | 510 kB 00:02 epel/other_db | 1.6 MB 00:05 epel/primary_db | 2.9 MB 00:14 extras | 2.1 kB 00:00 extras/fileLists_db | 224 kB 00:00 extras/other_db | 442 kB 00:01 extras/group | 9.7 kB 00:00 extras/primary_db | 173 kB 00:00 updates | 1.9 kB 00:00 updates/fileLists_db | 2.1 MB 00:09 updates/other_db | 11 MB 00:29 updates/primary_db | 531 kB 00:00 base 3667/3667base 3667/3667base 3667/3667Metadata Cache Created
5.搜刮安装
[root@localhost ~]# yum search gcc |grep --color '^gcc'gcc.x86_64 : VarIoUs compilers (C,C++,Objective-C,Java,...)gcc-c++.x86_64 : C++ support for GCCgcc-gfortran.x86_64 : Fortran 95 supportgcc-gnat.x86_64 : Ada 95 support for GCCgcc-java.x86_64 : Java support for GCCgcc-objc++.x86_64 : Objective-C++ support for GCCgcc-objc.x86_64 : Objective-C support for GCCgcc44.x86_64 : GNU Compiler Collection version 4.4gcc44-c++.x86_64 : C++ support for GCC version 4.4gcc44-gfortran.x86_64 : Fortran support for GCC 4.4
6.安装gcc
[root@localhost yum.repos.d]# yum -y install gcc
至此gcc安装完成.
但是当我安装pcre-8.39 执行./configure的时候出现差错
configure: error: You need a C++ compiler for C++ support
解决方法:
yum install -y gcc gcc-c++
本文永远更新链接地址:
欢迎参与《liNUX入门:linux RedHat无法安装软件问题(No package gcc available. nothing to do)》讨论,分享您的想法,内存溢出PHP学院为您提供专业教程。
总结以上是内存溢出为你收集整理的LINUX入门:Linux RedHat无法安装软件问题(No package gcc available. Nothing to do)全部内容,希望文章能够帮你解决LINUX入门:Linux RedHat无法安装软件问题(No package gcc available. Nothing to do)所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)