欧美一区二区三区老妇人-欧美做爰猛烈大尺度电-99久久夜色精品国产亚洲a-亚洲福利视频一区二区

安裝linuxredhat后無(wú)法使用yum命令安裝gcc-c++怎么解決

這篇文章主要介紹“安裝linux redhat后無(wú)法使用yum命令安裝gcc-c++怎么解決”的相關(guān)知識(shí),小編通過(guò)實(shí)際案例向大家展示操作過(guò)程,操作方法簡(jiǎn)單快捷,實(shí)用性強(qiáng),希望這篇“安裝linux redhat后無(wú)法使用yum命令安裝gcc-c++怎么解決”文章能幫助大家解決問(wèn)題。

成都創(chuàng)新互聯(lián)是一家專(zhuān)注于成都網(wǎng)站建設(shè)、網(wǎng)站設(shè)計(jì)與策劃設(shè)計(jì),濱江網(wǎng)站建設(shè)哪家好?成都創(chuàng)新互聯(lián)做網(wǎng)站,專(zhuān)注于網(wǎng)站建設(shè)十年,網(wǎng)設(shè)計(jì)領(lǐng)域的專(zhuān)業(yè)建站公司;建站業(yè)務(wù)涵蓋:濱江等地區(qū)。濱江做網(wǎng)站價(jià)格咨詢(xún):028-86922220

問(wèn)題:

[root@localhost ~]# yum -y install gcc
loaded plugins: katello, product-id, security, subscription-manager
updating certificate-based repositories.
unable to read consumer identity
setting up install process
no package gcc available.
nothing to do

對(duì)于習(xí)慣使用centos的人來(lái)說(shuō),不能使用這個(gè)命令,簡(jiǎn)直是種折磨

解決過(guò)程:

1.給linux redhat安裝centos鏡像

[root@localhost~]# wget http://mirrors.163.com/.help/centos6-base-163.repo
--2015-10-09 14:33:10-- http://mirrors.163.com/.help/centos6-base-163.repo
resolving mirrors.163.com... 123.58.173.186,123.58.173.185
connecting to mirrors.163.com|123.58.173.186|:80...connected.
http request sent, awaiting response... 200 ok
length: 2341 (2.3k) [application/octet-stream]
saving to: `centos6-base-163.repo'
100%2,341    --.-k/s  in 0s   
2015-10-09 14:33:22 (108 mb/s) -`centos6-base-163.repo' saved [2341/2341]

2.修改repo文件

[root@localhost~]# mv centos6-base-163.repo /etc/yum.repos.d/
*** 把$releasever替換成6
[root@localhost yum.repos.d]# sed -i 's#$releasever#6#g' ./centos6-base-163.repo

3.清除所有緩存

[root@localhost yum.repos.d]# yum clean all
loaded plugins: katello, product-id, security, subscription-manager
updating certificate-based repositories.
unable to read consumer identity
cleaning up everything

4.獲取yum列表

[root@localhost yum.repos.d]# yum makecache
loaded plugins: katello, product-id, security, subscription-manager
updating certificate-based repositories.
unable to read consumer identity
addons                                                 | 1.9 kb   00:00   
addons/filelists_db                                          | 570 b   00:00   
........
........
base                                                        3667/3667
base                                                        3667/3667
base                                                        3667/3667
metadata 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 gcc
gcc-gfortran.x86_64 : fortran 95 support
gcc-gnat.x86_64 : ada 95 support for gcc
gcc-java.x86_64 : java support for gcc
gcc-objc++.x86_64 : objective-c++ support for gcc
gcc-objc.x86_64 : objective-c support for gcc
gcc44.x86_64 : gnu compiler collection version 4.4
gcc44-c++.x86_64 : c++ support for gcc version 4.4
gcc44-gfortran.x86_64 : fortran support for gcc 4.4

6.安裝gcc

[root@localhost yum.repos.d]# yum -y install gcc

關(guān)于“安裝linux redhat后無(wú)法使用yum命令安裝gcc-c++怎么解決”的內(nèi)容就介紹到這里了,感謝大家的閱讀。如果想了解更多行業(yè)相關(guān)的知識(shí),可以關(guān)注創(chuàng)新互聯(lián)行業(yè)資訊頻道,小編每天都會(huì)為大家更新不同的知識(shí)點(diǎn)。

分享文章:安裝linuxredhat后無(wú)法使用yum命令安裝gcc-c++怎么解決
本文鏈接:http://chinadenli.net/article12/gsghgc.html

成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供網(wǎng)站設(shè)計(jì)定制開(kāi)發(fā)云服務(wù)器自適應(yīng)網(wǎng)站企業(yè)網(wǎng)站制作網(wǎng)站導(dǎo)航

廣告

聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶(hù)投稿、用戶(hù)轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請(qǐng)盡快告知,我們將會(huì)在第一時(shí)間刪除。文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如需處理請(qǐng)聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時(shí)需注明來(lái)源: 創(chuàng)新互聯(lián)

成都seo排名網(wǎng)站優(yōu)化