Linux系統yum安裝報錯Cannot find a valid baseurl for repo的解決方法
yum install error
[root@localhost cmake-3.2.2]# yum install gcc
Loaded plugins: fastestmirror, refresh-packagekit, security
Could not retrieve mirrorlist error was
14: PYCURL ERROR 6 - "Couldn't resolve host 'mirrorlist.centos.org'"
Error: Cannot retrieve repository metadata (repomd.xml) for repository: base. Please verify its path and try again
[root@localhost cmake-3.2.2]# yum install gcc-c++
Loaded plugins: fastestmirror, refresh-packagekit, security
Determining fastest mirrors
Could not retrieve mirrorlist error was
14: PYCURL ERROR 6 - "Couldn't resolve host 'mirrorlist.centos.org'"
Error: Cannot find a valid baseurl for repo: base
解決方法如下(修改dns配置)
vi /etc/resolv.conf
在此檔案最後加入:nameserver 114.114.114.114
再次安裝正常:
[root@localhost cmake-3.2.2]# yum install gcc
Loaded plugins: fastestmirror, refresh-packagekit, security
Loading mirror speeds from cached hostfile
* base: mirrors.tuna.tsinghua.edu.cn
* extras: mirrors.btte.net
* updates: mirrors.tuna.tsinghua.edu.cn
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package gcc.x86_64 0:4.4.7-17.el6 will be installed
--> Processing Dependency: libgomp = 4.4.7-17.el6 for package: gcc-4.4.7-17.el6.x86_64
--> Processing Dependency: cpp = 4.4.7-17.el6 for package: gcc-4.4.7-17.el6.x86_64
--> Processing Dependency: libgcc >= 4.4.7-17.el6 for package: gcc-4.4.7-17.el6.x86_64
--> Processing Dependency: cloog-ppl >= 0.15 for package: gcc-4.4.7-17.el6.x86_64
--> Running transaction check
---> Package cloog-ppl.x86_64 0:0.15.7-1.2.el6 will be installed
--> Processing Dependency: libppl_c.so.2()(64bit) for package: cloog-ppl-0.15.7-1.2.el6.x86_64
--> Processing Dependency: libppl.so.7()(64bit) for package: cloog-ppl-0.15.7-1.2.el6.x86_64
---> Package cpp.x86_64 0:4.4.7-17.el6 will be installed
--> Processing Dependency: libmpfr.so.1()(64bit) for package: cpp-4.4.7-17.el6.x86_64
---> Package libgcc.i686 0:4.4.7-4.el6 will be updated
---> Package libgcc.x86_64 0:4.4.7-4.el6 will be updated
---> Package libgcc.i686 0:4.4.7-17.el6 will be an update
---> Package libgcc.x86_64 0:4.4.7-17.el6 will be an update
---> Package libgomp.x86_64 0:4.4.7-4.el6 will be updated
---> Package libgomp.x86_64 0:4.4.7-17.el6 will be an update
--> Running transaction check
---> Package mpfr.x86_64 0:2.4.1-6.el6 will be installed
---> Package ppl.x86_64 0:0.10.2-11.el6 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
==============================================================================================================================================
Package Arch Version Repository Size
==============================================================================================================================================
Installing:
gcc x86_64 4.4.7-17.el6 base 10 M
Installing for dependencies:
cloog-ppl x86_64 0.15.7-1.2.el6 base 93 k
cpp x86_64 4.4.7-17.el6 base 3.7 M
mpfr x86_64 2.4.1-6.el6 base 157 k
ppl x86_64 0.10.2-11.el6 base 1.3 M
Updating for dependencies:
libgcc i686 4.4.7-17.el6 base 114 k
libgcc x86_64 4.4.7-17.el6 base 103 k
libgomp x86_64 4.4.7-17.el6 base 134 k
Transaction Summary
==============================================================================================================================================
Install 5 Package(s)
Upgrade 3 Package(s)
Total download size: 16 M
Is this ok [y/N]:
[root@localhost cmake-3.2.2]# yum install gcc
Loaded plugins: fastestmirror, refresh-packagekit, security
Could not retrieve mirrorlist error was
14: PYCURL ERROR 6 - "Couldn't resolve host 'mirrorlist.centos.org'"
Error: Cannot retrieve repository metadata (repomd.xml) for repository: base. Please verify its path and try again
[root@localhost cmake-3.2.2]# yum install gcc-c++
Loaded plugins: fastestmirror, refresh-packagekit, security
Determining fastest mirrors
Could not retrieve mirrorlist error was
14: PYCURL ERROR 6 - "Couldn't resolve host 'mirrorlist.centos.org'"
Error: Cannot find a valid baseurl for repo: base
解決方法如下(修改dns配置)
vi /etc/resolv.conf
在此檔案最後加入:nameserver 114.114.114.114
再次安裝正常:
[root@localhost cmake-3.2.2]# yum install gcc
Loaded plugins: fastestmirror, refresh-packagekit, security
Loading mirror speeds from cached hostfile
* base: mirrors.tuna.tsinghua.edu.cn
* extras: mirrors.btte.net
* updates: mirrors.tuna.tsinghua.edu.cn
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package gcc.x86_64 0:4.4.7-17.el6 will be installed
--> Processing Dependency: libgomp = 4.4.7-17.el6 for package: gcc-4.4.7-17.el6.x86_64
--> Processing Dependency: cpp = 4.4.7-17.el6 for package: gcc-4.4.7-17.el6.x86_64
--> Processing Dependency: libgcc >= 4.4.7-17.el6 for package: gcc-4.4.7-17.el6.x86_64
--> Processing Dependency: cloog-ppl >= 0.15 for package: gcc-4.4.7-17.el6.x86_64
--> Running transaction check
---> Package cloog-ppl.x86_64 0:0.15.7-1.2.el6 will be installed
--> Processing Dependency: libppl_c.so.2()(64bit) for package: cloog-ppl-0.15.7-1.2.el6.x86_64
--> Processing Dependency: libppl.so.7()(64bit) for package: cloog-ppl-0.15.7-1.2.el6.x86_64
---> Package cpp.x86_64 0:4.4.7-17.el6 will be installed
--> Processing Dependency: libmpfr.so.1()(64bit) for package: cpp-4.4.7-17.el6.x86_64
---> Package libgcc.i686 0:4.4.7-4.el6 will be updated
---> Package libgcc.x86_64 0:4.4.7-4.el6 will be updated
---> Package libgcc.i686 0:4.4.7-17.el6 will be an update
---> Package libgcc.x86_64 0:4.4.7-17.el6 will be an update
---> Package libgomp.x86_64 0:4.4.7-4.el6 will be updated
---> Package libgomp.x86_64 0:4.4.7-17.el6 will be an update
--> Running transaction check
---> Package mpfr.x86_64 0:2.4.1-6.el6 will be installed
---> Package ppl.x86_64 0:0.10.2-11.el6 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
==============================================================================================================================================
Package Arch Version Repository Size
==============================================================================================================================================
Installing:
gcc x86_64 4.4.7-17.el6 base 10 M
Installing for dependencies:
cloog-ppl x86_64 0.15.7-1.2.el6 base 93 k
cpp x86_64 4.4.7-17.el6 base 3.7 M
mpfr x86_64 2.4.1-6.el6 base 157 k
ppl x86_64 0.10.2-11.el6 base 1.3 M
Updating for dependencies:
libgcc i686 4.4.7-17.el6 base 114 k
libgcc x86_64 4.4.7-17.el6 base 103 k
libgomp x86_64 4.4.7-17.el6 base 134 k
Transaction Summary
==============================================================================================================================================
Install 5 Package(s)
Upgrade 3 Package(s)
Total download size: 16 M
Is this ok [y/N]:
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/15498/viewspace-2135089/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- CentOS7中使用yum安裝時報cannot find a valid baseurl for repo錯誤CentOS
- All mirror URLs are not using ftp, http[s] or file. Cannot find a valid baseurl for repo: baseFTPHTTP
- cenots7.6系統報“fork:Cannot allocate memory” 報錯的解決方法(實操)
- linux系統安裝yumLinux
- 安裝psutil模組報錯的解決方法
- yum方式安裝Percona XtraBackup報錯解決一例
- linux 安裝 jupyter報錯解決Linux
- Cannot find SS.INI file for user *** 解決方法
- kaldi的編譯安裝與報錯解決方法編譯
- 解決 Cannot find OpenSSL's
- Linux yum安裝httpd報錯 No package httpd available ?LinuxhttpdPackageAI
- CentOS release 6.5 yum安裝報錯CentOS
- yum install 安裝linux系統包Linux
- 安裝ionic 報錯 安裝canvas報錯 解決辦法Canvas
- linux裡面yum安裝軟體報錯處理Linux
- 解決cannot find module providing package或cannot find main modulePackageAI
- mongodb find報錯怎麼解決MongoDB
- Ubuntu系統中找不到yum及安裝方法!Ubuntu
- Linux yum提示Loaded plugins錯誤的解決方法LinuxPlugin
- 安裝sass報錯解決方案
- 【cypress】2. 安裝Cypress(windows系統),以及cypress open報錯解決。Windows
- brew 報錯 error: Not a valid ref: refs/remotes/origin/master 的解決方法ErrorREMAST
- Laravel安裝horizon報錯解決方案Laravel
- mac Pro 安裝scrapy報錯解決Mac
- win安裝wordcloud報錯解決方案Cloud
- YUM安裝除錯以及命令詳解除錯
- PHP動態編譯出現Cannot find autoconf的解決方法PHP編譯
- ceph叢集安裝報錯解決方法
- win10系統itunes解除安裝後安裝不了的解決方法Win10
- PHP報錯:?configure: error: Cannot find libmysqlclientPHPErrorIBMMySqlclient
- yum安裝 一直出現There are no enabled repositories in “/etc/yum.repos.d“
- 使用pip安裝selenium庫一直報錯的解決方法
- CentOS 6.5編譯安裝IPVS 1.26報錯的解決方法CentOS編譯
- 解決Ubuntu報錯 E: Unable to locate package yumUbuntuPackage
- Centos7系統中找不到yum及安裝方法。CentOS
- Linux 安裝 yumLinux
- linux 安裝yum 安裝phpLinuxPHP
- Python系統效能資訊模組psutil安裝報錯解決一例Python