본문 바로가기
IT&Guide

Error: Cannot find a valid baseurl for repo: base | yum 설치시 발생하는 에러 해결 방법, CentOS 6 에러.

by Jigton GAL 2023. 2. 22.
반응형

sendmail을 yum 으로 설치하려다 아래와 같은 에러가 나왔다.

 

yum  설치 발생하는 에러 해결 방법

# yum install -y sendmail sendmail-cf

 

Loaded plugins: fastestmirror
Setting up Install Process
Determining fastest mirrors
YumRepo Error: All mirror URLs are not using ftp, http[s] or file.
 Eg. Invalid release/repo/arch combination/
removing mirrorlist with no valid mirrors: /var/cache/yum/x86_64/6/base/mirrorlist.txt
Error: Cannot find a valid baseurl for repo: base

 

위와 같은 에러가 뜬다면, 아래와 같이 조치하자.

먼저 현재서버 OS의 비트를 파악하자.

 

# getconf LONG_BIT

 

입력하면  32 비트인지, 64비트인지 숫자로 알려준다.

 

1. 64비트일 경우

echo "https://vault.centos.org/6.10/os/x86_64/" > /var/cache/yum/x86_64/6/base/mirrorlist.txt
echo "https://vault.centos.org/6.10/extras/x86_64/" > /var/cache/yum/x86_64/6/extras/mirrorlist.txt
echo "https://vault.centos.org/6.10/updates/x86_64/" > /var/cache/yum/x86_64/6/updates/mirrorlist.txt

 

2. 32비트일 경우
echo "https://vault.centos.org/6.10/os/i386/" > /var/cache/yum/i386/6/base/mirrorlist.txt
echo "https://vault.centos.org/6.10/extras/i386/" > /var/cache/yum/i386/6/extras/mirrorlist.txt
echo "https://vault.centos.org/6.10/updates/i386/" > /var/cache/yum/i386/6/updates/mirrorlist.txt

 

 

위와 같이 3줄을 실행 시킨 후 yum을 해 주면 정상적으로 잘 설치가 된다. 

 

# yum install -y sendmail sendmail-cf

 

Loaded plugins: fastestmirror
Setting up Install Process
Determining fastest mirrors
 * rpmforge: kartolo.sby.datautama.net.id
base                                                                                        | 3.7 kB     00:00     
extras                                                                                      | 3.4 kB     00:00     
extras/primary_db                                                                           |  29 kB     00:00     
rpmforge                                                                                    | 1.9 kB     00:00     
updates                                                                                     | 3.4 kB     00:00     
updates/primary_db                                                                          |  12 MB     00:02     
Resolving Dependencies
--> Running transaction check
---> Package sendmail.x86_64 0:8.14.4-9.el6_8.1 will be installed
--> Processing Dependency: procmail for package: sendmail-8.14.4-9.el6_8.1.x86_64
--> Processing Dependency: libhesiod.so.0()(64bit) for package: sendmail-8.14.4-9.el6_8.1.x86_64
---> Package sendmail-cf.noarch 0:8.14.4-9.el6_8.1 will be installed
--> Running transaction check
---> Package hesiod.x86_64 0:3.1.0-19.el6 will be installed
---> Package procmail.x86_64 0:3.22-25.1.el6_5.1 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

===================================================================================================================
 Package                     Arch                   Version                             Repository            Size
===================================================================================================================
Installing:
 sendmail                    x86_64                 8.14.4-9.el6_8.1                    base                 717 k
 sendmail-cf                 noarch                 8.14.4-9.el6_8.1                    base                 184 k
Installing for dependencies:
 hesiod                      x86_64                 3.1.0-19.el6                        base                  20 k
 procmail                    x86_64                 3.22-25.1.el6_5.1                   base                 162 k

Transaction Summary
===================================================================================================================
Install       4 Package(s)

Total download size: 1.1 M
Installed size: 2.8 M
Downloading Packages:
(1/4): hesiod-3.1.0-19.el6.x86_64.rpm                                                       |  20 kB     00:00     
(2/4): procmail-3.22-25.1.el6_5.1.x86_64.rpm                                                | 162 kB     00:00     
(3/4): sendmail-8.14.4-9.el6_8.1.x86_64.rpm                                                 | 717 kB     00:00     
(4/4): sendmail-cf-8.14.4-9.el6_8.1.noarch.rpm                                              | 184 kB     00:00     
-------------------------------------------------------------------------------------------------------------------
Total                                                                              927 kB/s | 1.1 MB     00:01     
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing : hesiod-3.1.0-19.el6.x86_64                                                                      1/4 
  Installing : procmail-3.22-25.1.el6_5.1.x86_64                                                               2/4 
  Installing : sendmail-8.14.4-9.el6_8.1.x86_64                                                                3/4 
  Installing : sendmail-cf-8.14.4-9.el6_8.1.noarch                                                             4/4 
  Verifying  : procmail-3.22-25.1.el6_5.1.x86_64                                                               1/4 
  Verifying  : sendmail-8.14.4-9.el6_8.1.x86_64                                                                2/4 
  Verifying  : sendmail-cf-8.14.4-9.el6_8.1.noarch                                                             3/4 
  Verifying  : hesiod-3.1.0-19.el6.x86_64                                                                      4/4 

Installed:
  sendmail.x86_64 0:8.14.4-9.el6_8.1                     sendmail-cf.noarch 0:8.14.4-9.el6_8.1                    

Dependency Installed:
  hesiod.x86_64 0:3.1.0-19.el6                         procmail.x86_64 0:3.22-25.1.el6_5.1                        

 

Complete!

 

 

 

 

반응형

댓글