LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Yum updater does not work, no repolist on my CentOS system. (https://www.linuxquestions.org/questions/linux-general-1/yum-updater-does-not-work-no-repolist-on-my-centos-system-4175553589/)

brh1 09-15-2015 02:59 PM

Yum updater does not work, no repolist on my CentOS system.
 
Good day all.

I've installed CentOS 7 on a VM without any noticeable problems. However, when trying to update the system, I found that yum updater does not work. It seems I do not have any repos defined.

Code:

[root@centos7 brh]# yum check-update
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
There are no enabled repos.
 Run "yum repolist all" to see the repos you have.
 You can enable repos with yum-config-manager --enable <repo>

No repos:

Code:

[root@centos7 brh]# yum repolist all
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile

Also,my yum.conf has no repo mirrors defined:

Code:

[root@centos7 brh]# cat /etc/yum.conf
[main]
cachedir=/var/cache/yum/$basearch/$releasever
keepcache=0
debuglevel=2
logfile=/var/log/yum.log
exactarch=1
obsoletes=1
gpgcheck=1
plugins=1
installonly_limit=5
bugtracker_url=http://bugs.centos.org/set_project.php?project_id=23&ref=http://bugs.centos.org/bug_report_page.php?category=yum
distroverpkg=centos-release


#  This is the default, if you make this bigger yum won't see if the metadata
# is newer on the remote and so you'll "gain" the bandwidth of not having to
# download the new metadata and "pay" for it by yum not having correct
# information.
#  It is esp. important, to have correct metadata, for distributions like
# Fedora which don't keep old packages around. If you don't like this checking
# interupting your command line usage, it's much better to have something
# manually check the metadata once an hour (yum-updatesd will do this).
# metadata_expire=90m

# PUT YOUR REPOS HERE OR IN separate files named file.repo
# in /etc/yum.repos.d

How can I get a valid repolist?

Thanks in advance,

Bjoern

Ztcoracat 09-15-2015 06:57 PM

You have to enable the EPEL Repo-

See this link:
http://www.tecmint.com/how-to-enable...el-centos-6-5/

knudfl 09-15-2015 08:14 PM

1 Attachment(s)
@brh1, the repo`s are not defined in /etc/yum.conf . Never.

'yum' will look for repo files in /etc/yum/repos.d/, where the enabled file is CentOS-Base.repo .
Attached as CentOS7-Base.repo.txt .

Extra repo`s : Simply add a file, e.g. 'epel.repo' :
# yum install Downloads/epel-release-7-5.noarch.rpm
https://dl.fedoraproject.org/pub/epe...7-5.noarch.rpm
Ref. https://fedoraproject.org/wiki/EPEL

-

brh1 09-16-2015 07:51 AM

Quote:

Originally Posted by knudfl (Post 5420939)
@brh1, the repo`s are not defined in /etc/yum.conf . Never.

'yum' will look for repo files in /etc/yum/repos.d/, where the enabled file is CentOS-Base.repo .
Attached as CentOS7-Base.repo.txt .

Extra repo`s : Simply add a file, e.g. 'epel.repo' :
# yum install Downloads/epel-release-7-5.noarch.rpm
https://dl.fedoraproject.org/pub/epe...7-5.noarch.rpm
Ref. https://fedoraproject.org/wiki/EPEL

-

Thanks for your reply knudfl.

I made a directory /etc/yum/repos.d and dropped the repo file you attached in it. Here's the yum check-update result:
Code:

[root@centos7 repos.d]# yum check-update
Loaded plugins: fastestmirror, langpacks
Repodata is over 2 weeks old. Install yum-cron? Or run: yum makecache fast
base                                                                                                              | 4.8 kB  00:00:00   
http://mirror.millry.co/CentOS/7.0.1406/os/x86_64/repodata/repomd.xml: [Errno -1] Error importing repomd.xml for base: Damaged repomd.xml file
Trying other mirror.

All the other mirrors failed with Errno -1

Bjoern

brh1 09-16-2015 07:58 AM

Quote:

Originally Posted by Ztcoracat (Post 5420917)
You have to enable the EPEL Repo-

See this link:
http://www.tecmint.com/how-to-enable...el-centos-6-5/

Thanks for your reply Ztcoracat.

I tried your method, downloading the rpm was no problem, but the installation failed:
Code:

[root@centos7 repos.d]# wget http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-5.noarch.rpm
--2015-09-16 07:54:00--  http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-5.noarch.rpm
Resolving dl.fedoraproject.org (dl.fedoraproject.org)... 209.132.181.23, 209.132.181.24, 209.132.181.26, ...
Connecting to dl.fedoraproject.org (dl.fedoraproject.org)|209.132.181.23|:80... connected.
HTTP request sent, awaiting response... 302 Not Allowed
Location: http://cso.att.com/FAQs/URLFiltering/ProxyWarning.html [following]
--2015-09-16 07:54:00--  http://cso.att.com/FAQs/URLFiltering/ProxyWarning.html
Resolving cso.att.com (cso.att.com)... 135.53.21.118
Connecting to cso.att.com (cso.att.com)|135.53.21.118|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 4877 (4.8K) [text/html]
Saving to: ‘epel-release-7-5.noarch.rpm’

100%[===============================================================================================>] 4,877      --.-K/s  in 0s
   

2015-09-16 07:54:00 (626 MB/s) - ‘epel-release-7-5.noarch.rpm’ saved [4877/4877]

[root@centos7 repos.d]# rpm -ivh epel-release-7-5.noarch.rpm
error: open of <!DOCTYPE failed: No such file or directory
error: open of html failed: No such file or directory
error: open of PUBLIC failed: No such file or directory..........


Bjoern

Ztcoracat 09-16-2015 11:01 AM

Quote:

Originally Posted by brh1 (Post 5421160)
Thanks for your reply Ztcoracat.

I tried your method, downloading the rpm was no problem, but the installation failed:
Code:

[root@centos7 repos.d]# wget http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-5.noarch.rpm
--2015-09-16 07:54:00--  http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-5.noarch.rpm
Resolving dl.fedoraproject.org (dl.fedoraproject.org)... 209.132.181.23, 209.132.181.24, 209.132.181.26, ...
Connecting to dl.fedoraproject.org (dl.fedoraproject.org)|209.132.181.23|:80... connected.
HTTP request sent, awaiting response... 302 Not Allowed
Location: http://cso.att.com/FAQs/URLFiltering/ProxyWarning.html [following]
--2015-09-16 07:54:00--  http://cso.att.com/FAQs/URLFiltering/ProxyWarning.html
Resolving cso.att.com (cso.att.com)... 135.53.21.118
Connecting to cso.att.com (cso.att.com)|135.53.21.118|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 4877 (4.8K) [text/html]
Saving to: ‘epel-release-7-5.noarch.rpm’

100%[===============================================================================================>] 4,877      --.-K/s  in 0s
   

2015-09-16 07:54:00 (626 MB/s) - ‘epel-release-7-5.noarch.rpm’ saved [4877/4877]

[root@centos7 repos.d]# rpm -ivh epel-release-7-5.noarch.rpm
error: open of <!DOCTYPE failed: No such file or directory
error: open of html failed: No such file or directory
error: open of PUBLIC failed: No such file or directory..........


Bjoern

Sorry it failed.
It may have failed because the extras were disabled?

Try this:
Code:

wget http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-5.noarch.rpm
sudo rpm -Uvh epel-release-7*.rpm

Instructions are in the second link.

https://www.centos.org/docs/5/html/y...ositories.html
http://www.rackspace.com/knowledge_c...os-and-red-hat

knudfl 09-16-2015 11:57 AM

Re #4.
Quote:

I made a directory /etc/yum/repos.d/
There are some indications in your post that some other folders / files are missing in /etc/.
? How did you get your OS messed up ?
( /etc/yum/repos.d/ is always present after the OS install.)


-

John VV 09-16-2015 01:14 PM

Quote:

I made a directory /etc/yum/repos.d
knudfl has a point

WTF

that folder IS!!! a default folder
it WAS made at the time of install
it IS part of the Operation system


it is like saying that "C:\\Program Files (x86)\Common Files" is missing on a windows machine

REINSTALL this severely broken OS

brh1 09-17-2015 12:32 PM

Quote:

Originally Posted by John VV (Post 5421307)
knudfl has a point

WTF

that folder IS!!! a default folder
it WAS made at the time of install
it IS part of the Operation system


it is like saying that "C:\\Program Files (x86)\Common Files" is missing on a windows machine

REINSTALL this severely broken OS

I just now did a new installation of CentOS 7 from an ISO (CentOS-7.0-1406-x86_64-DVD.iso). There IS NO!!! /etc/yum/repos.d:
Code:

[brh@localhost yum]$ ls -la /etc/yum
total 28
drwxr-xr-x.  6 root root 4096 Sep 17 06:55 .
drwxr-xr-x. 132 root root 8192 Sep 17 12:10 ..
drwxr-xr-x.  2 root root    6 Jun 27  2014 fssnap.d
drwxr-xr-x.  2 root root  52 Sep 17 07:01 pluginconf.d
drwxr-xr-x.  2 root root  25 Sep 17 06:55 protected.d
drwxr-xr-x.  2 root root    6 Jun 27  2014 vars
-rw-r--r--.  1 root root  444 Jun 27  2014 version-groups.conf
-rw-r--r--.  1 root root 2537 Jun 27  2014 yum-cron.conf
-rw-r--r--.  1 root root 2499 Jun 27  2014 yum-cron-hourly.conf
[brh@localhost yum]$


michaelk 09-17-2015 12:55 PM

That is correct, there isn't a /etc/yum/repos.d. It changed in version 7. Did anyone read the 1st post?

Quote:

# PUT YOUR REPOS HERE OR IN separate files named file.repo
# in /etc/yum.repos.d
I assume that yum is working since you reinstalled?

brh1 09-17-2015 02:04 PM

Quote:

Originally Posted by michaelk (Post 5421785)
That is correct, there isn't a /etc/yum/repos.d. It changed in version 7. Did anyone read the 1st post?



I assume that yum is working since you reinstalled?


Nope. Now it barfed a different error message:

Code:

[root@localhost brh]# yum check-update
Loaded plugins: fastestmirror, langpacks


 One of the configured repositories failed (Unknown),
 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. Disable the repository, 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>

    4. 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


michaelk 09-17-2015 02:53 PM

What virtual software are you running i.e. vmware, virtualbox etc.

How did you configure the VM network adapter?

brh1 09-18-2015 12:16 AM

Quote:

Originally Posted by michaelk (Post 5421836)
What virtual software are you running i.e. vmware, virtualbox etc.

How did you configure the VM network adapter?

Running on VMware Player v6 and network adapter setup for NAT. I have no issues with this VM on another PC at home. I'll just have to do a 'stare-and-compare' as soon as I get the opportunity.

Bjoern


All times are GMT -5. The time now is 07:54 PM.