(網(wǎng)卡配置資料)
原因:
????????網(wǎng)絡(luò)問題
報(bào)錯(cuò)詳情:
One of the configured repositories failed (未知),
and yum doesn't have enough cached data to continue. At this point the only
safe thing yum can do is fail. There are a few ways to work "fix" this:
1. Contact the upstream for the repository and get them to fix the problem.
2. Reconfigure the baseurl/etc. for the repository, to point to a working
upstream. This is most often useful if you are using a newer
distribution release than is supported by the repository (and the
packages for the previous distribution release still work).
3. Run the command with the repository temporarily disabled
yum --disablerepo=<repoid> ...
4. Disable the repository permanently, so yum won't use it by default. Yum
will then just ignore the repository until you permanently enable it
again or use --enablerepo for temporary usage:
yum-config-manager --disable <repoid>
or
subscription-manager repos --disable=<repoid>
5. Configure the failing repository to be skipped, if it is unavailable.
Note that yum will try to contact the repo. when it runs most commands,
so will have to try and fail each time (and thus. yum will be be much
slower). If it is a very temporary problem though, this is often a nice
compromise:
yum-config-manager --save --setopt=<repoid>.skip_if_unavailable=true
Cannot find a valid baseurl for repo: base/7/x86_64
解決步驟:
1、修改虛擬機(jī)的網(wǎng)絡(luò)連接模式為 NAT模式
2、右擊桌面,打開終端
①首先查看網(wǎng)關(guān)配置文件名:
輸入
ifconfig
②配置網(wǎng)卡信息:
vi /etc/sysconfig/network-scripts/ifcfg-ens32
?兩種方法:
點(diǎn)擊鍵盤 I ,開始輸入
第一種:自動(dòng)配置
①
1、BOOTPROTO=dhcp(自動(dòng)獲取ip)
2、ONBOOT=yes(設(shè)置開機(jī)自啟動(dòng))
②
ESC--》:wq
在終端輸入
?service network restart
重啟網(wǎng)絡(luò)服務(wù)?
ping www.baidu.com
查看網(wǎng)絡(luò)是否通,如圖
第二種:手動(dòng)配置(之前配置有用的,但重新做了一遍,又不行了。把大體思路記錄下吧)
①主機(jī)cmd,輸入:
ipconfig
?找到所用的網(wǎng)的IP
BOOTPROTO= static (需手動(dòng)配置)?
?②
ESC--》:wq
在終端輸入
?service network restart
重啟網(wǎng)絡(luò)服務(wù)?
ping www.baidu.com
查看網(wǎng)絡(luò)是否通,如圖
驗(yàn)證
安裝gcc
yum -y install gcc gcc-c++ autoconf pcre pcre-devel make automake
yum -y install wget httpd-tools vim
查看 gcc版本
gcc -v
文章來源:http://www.zghlxwxcb.cn/news/detail-695370.html
輸出以上信息,即為成功文章來源地址http://www.zghlxwxcb.cn/news/detail-695370.html
到了這里,關(guān)于親測(cè)有效:虛擬機(jī)安裝gcc,報(bào)錯(cuò)Could not retrieve mirrorlist http://mirrorlist.centos.org的文章就介紹完了。如果您還想了解更多內(nèi)容,請(qǐng)?jiān)谟疑辖撬阉鱐OY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!