Advertisements

Tag Archives: yum

Enabling EPEL on CentOS 7

Extra Packages for Enterprise Linux (or EPEL) is a Fedora Special Interest Group that creates, maintains, and manages a high quality set of additional packages for Enterprise Linux, including, but not limited to, Red Hat Enterprise Linux (RHEL), CentOS and Scientific Linux (SL), Oracle Linux (OL).

To enable it on CentOS 7, simply install a package called epel-release

root@linux:~ # yum install -y epel-release
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: centos.xpg.com.br
* extras: centos.xpg.com.br
* updates: mirror.globo.com
Resolving Dependencies
–> Running transaction check
—> Package epel-release.noarch 0:7-6 will be installed
–> Finished Dependency Resolution

Dependencies Resolved

================================================================================
Package Arch Version Repository Size
================================================================================
Installing:
epel-release noarch 7-6 extras 14 k

Transaction Summary
================================================================================
Install 1 Package

Total download size: 14 k
Installed size: 24 k
Downloading packages:
epel-release-7-6.noarch.rpm | 14 kB 00:00
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : epel-release-7-6.noarch 1/1
Verifying : epel-release-7-6.noarch 1/1

Installed:
epel-release.noarch 0:7-6

Complete!

Listing repositories

root@linux:~ # yum repolist
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: centos.xpg.com.br
* epel: mirror.globo.com
* extras: centos.xpg.com.br
* updates: mirror.globo.com
repo id repo name status
base/7/x86_64 CentOS-7 – Base 9,007
epel/x86_64 Extra Packages for Enterprise Linux 7 – x86_64 10,600
extras/7/x86_64 CentOS-7 – Extras 390
updates/7/x86_64 CentOS-7 – Updates 2,471
repolist: 22,468

Advertisements

Using yum behind a proxy on CentOS 6.3 and showing message Error: Cannot retrieve metalink for repository: epel. Please verify its path and try again

I’m behind a proxy and having problems using the EPEL repository on CentOS 6.3.

After installing it, it shows the message Error: Cannot retrieve metalink for repository: epel. Please verify its path and try again

root@linux:~ # yum repolist
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
Error: Cannot retrieve metalink for repository: epel. Please verify its path and try again

From what I read, yum is not able to access the repository using HTTPS. So replace https for http

root@linux:~ # mv /etc/yum.repos.d/epel.repo /etc/yum.repos.d/epel.repo.bak
root@linux:~ # sed ‘s/https/http/g’ /etc/yum.repos.d/epel.repo.bak > /etc/yum.repos.d/epel.repo

Bug 486324 – (yum with proxy) and (repo with https uri) / ssl request doesn’t work throught proxy

error while loading shared libraries: libnl.so.1

error while loading shared libraries: libnl.so.1

Check which package provides the library that you want.

On Red Hat Linux you can check running yum whatprovides. On my case, I need to install libnl to solve my problem

root@linux:~ # yum whatprovides */libnl.so.1
Loaded plugins: downloadonly, rhnplugin, security

libnl-1.0-0.10.pre5.4.i386 : Convenience library for kernel netlink sockets
Repo : internalrepository
Matched from:
Filename : /usr/lib/libnl.so.1

libnl-1.0-0.10.pre5.5.i386 : Convenience library for kernel netlink sockets
Repo : internalrepository
Matched from:
Filename : /usr/lib/libnl.so.1

libnl-1.0-0.10.pre5.5.x86_64 : Convenience library for kernel netlink sockets
Repo : internalrepository
Matched from:
Filename : /usr/lib64/libnl.so.1

libnl-1.0-0.10.pre5.4.x86_64 : Convenience library for kernel netlink sockets
Repo : internalrepository
Matched from:
Filename : /usr/lib64/libnl.so.1

Error when updating Google Chrome: Public key for google-chrome-release-version.x86_64.rpm is not installed

When you update your Fedora desktop, you may receive a message complaining about a public key for Google Chrome not installed on your system

Public key for google-chrome-stable-41.0.2272.76-1.x86_64.rpm is not installed

Update the repository file and add the gpgkey parameter. If you want to install, you can also create this file and then yum install google-chrome-stable

root@fedora:~ # vi /etc/yum.repos.d/google-chrome.repo

[google-chrome]
name=google-chrome
baseurl=http://dl.google.com/linux/chrome/rpm/stable/x86_64
enabled=1
gpgcheck=1
gpgkey=https://dl-ssl.google.com/linux/linux_signing_key.pub

Then run again yum update or yum install google-chrome-stable and it will automatically import the public key

warning: /var/cache/yum/x86_64/21/google-chrome/packages/google-chrome-stable-41.0.2272.76-1.x86_64.rpm: Header V4 DSA/SHA1 Signature, key ID 7fac5991: NOKEY
Retrieving key from https://dl-ssl.google.com/linux/linux_signing_key.pub
Importing GPG key 0x7FAC5991:
Userid : “Google, Inc. Linux Package Signing Key <linux-packages-keymaster@google.com>”
Fingerprint: 4cca 1eaf 950c ee4a b839 76dc a040 830f 7fac 5991
From : https://dl-ssl.google.com/linux/linux_signing_key.pub

abrtd and abrt showing Corrupted or bad directory in /var/log/messages

Jul 24 10:52:12 rhel6 abrtd: New client connected
Jul 24 10:52:12 rhel6 abrt-server[66371]: Saved Python crash dump of pid 66370 to /var/spool/abrt/pyhook-2014-07-24-10:52:12-66370
Jul 24 10:52:12 rhel6 abrtd: Directory ‘pyhook-2014-07-24-10:52:12-66370’ creation detected
Jul 24 10:52:27 rhel6 abrtd: Sending an email…
Jul 24 10:52:27 rhel6 abrtd: Email was sent to: root@localhost
Jul 24 10:52:27 rhel6 abrtd: Duplicate: UUID
Jul 24 10:52:27 rhel6 abrtd: DUP_OF_DIR: /var/spool/abrt/pyhook-2014-06-12-14:10:18-27149
Jul 24 10:52:27 rhel6 abrtd: Corrupted or bad directory ‘/var/spool/abrt/pyhook-2014-07-24-10:47:08-41575’, deleting
Jul 24 10:54:44 rhel6 abrt: detected unhandled Python exception in ‘/usr/share/rhn/up2date_client/hardware.py’

You need to update the package rhn-client-tools and its dependencies.

root@rhel6:~ # yum update rhn-client-tools
root@rhel6:~ # service rhnsd restart

Souce: https://access.redhat.com/solutions/506353

yum: No module named gzip or another library

You are troubleshooting your yum installation, getting the missing libraries

root@linux:~ # yum whatprovides
There was a problem importing one of the Python modules
required to run yum. The error leading to this problem was:

No module named gzip

Please install a package which provides this module, or
verify that the module is installed correctly.

It’s possible that the above module doesn’t match the
current version of Python, which is:
2.4.3 (#1, Aug 29 2011, 10:55:55)
[GCC 4.1.2 20080704 (Red Hat 4.1.2-51)]

If you cannot solve this problem yourself, please go to
the yum faq at:
http://wiki.linux.duke.edu/YumFaq

If you see a different module, try to install all python libraries

root@linux:~ # yum repolist
There was a problem importing one of the Python modules
required to run yum. The error leading to this problem was:

No module named zlib

Please install a package which provides this module, or
verify that the module is installed correctly.

It’s possible that the above module doesn’t match the
current version of Python, which is:
2.4.3 (#1, Aug 29 2011, 10:55:55)
[GCC 4.1.2 20080704 (Red Hat 4.1.2-51)]

If you cannot solve this problem yourself, please go to
the yum faq at:
http://wiki.linux.duke.edu/YumFaq

List the packages starting with python

root@linux:~ # rpm -qa –qf “%{n}-%{arch}\n” | grep ^python
python-ldap-x86_64
python-urlgrabber-noarch
python-x86_64
python-libs-x86_64
python-devel-x86_64
python-sqlite-x86_64
python-numeric-x86_64
python-iniparse-noarch
python-elementtree-x86_64
python-dmidecode-x86_64
python-devel-i386

And query each one of them to see if there is a missing file. Reinstall the packages that report missing files.

root@linux:~ # rpm -V python-devel-2.4.3-44.el5_7.1
missing /usr/lib64/python2.4/test/decimaltestdata/normalize.decTest
missing /usr/lib64/python2.4/test/decimaltestdata/quantize.decTest
missing /usr/lib64/python2.4/test/output/test_tokenize
missing /usr/lib64/python2.4/test/test_normalization.pyc
missing /usr/lib64/python2.4/test/test_normalization.pyo
missing /usr/lib64/python2.4/test/test_zipfile.py
missing /usr/lib64/python2.4/test/test_zipfile.pyc
missing /usr/lib64/python2.4/test/test_zipfile.pyo
missing /usr/lib64/python2.4/test/test_zipimport.py
missing /usr/lib64/python2.4/test/test_zipimport.pyc
missing /usr/lib64/python2.4/test/test_zipimport.pyo
missing /usr/lib/python2.4/test/decimaltestdata/normalize.decTest
missing /usr/lib/python2.4/test/decimaltestdata/quantize.decTest
missing /usr/lib/python2.4/test/output/test_tokenize
missing /usr/lib/python2.4/test/test_normalization.pyc
missing /usr/lib/python2.4/test/test_normalization.pyo
missing /usr/lib/python2.4/test/test_zipfile.py
missing /usr/lib/python2.4/test/test_zipfile.pyc
missing /usr/lib/python2.4/test/test_zipfile.pyo
missing /usr/lib/python2.4/test/test_zipimport.py
missing /usr/lib/python2.4/test/test_zipimport.pyc
missing /usr/lib/python2.4/test/test_zipimport.pyo

root@linux:~ # rpm -V python-ldap-2.2.0-2.1

root@linux:~ # rpm -V python-urlgrabber-3.1.0-6.el5

root@linux:~ # rpm -V python-devel-2.4.3-44.el5_7.1
missing /usr/lib64/python2.4/test/decimaltestdata/normalize.decTest
missing /usr/lib64/python2.4/test/decimaltestdata/quantize.decTest
missing /usr/lib64/python2.4/test/output/test_tokenize
missing /usr/lib64/python2.4/test/test_normalization.pyc
missing /usr/lib64/python2.4/test/test_normalization.pyo
missing /usr/lib64/python2.4/test/test_zipfile.py
missing /usr/lib64/python2.4/test/test_zipfile.pyc
missing /usr/lib64/python2.4/test/test_zipfile.pyo
missing /usr/lib64/python2.4/test/test_zipimport.py
missing /usr/lib64/python2.4/test/test_zipimport.pyc
missing /usr/lib64/python2.4/test/test_zipimport.pyo
missing /usr/lib/python2.4/test/decimaltestdata/normalize.decTest
missing /usr/lib/python2.4/test/decimaltestdata/quantize.decTest
missing /usr/lib/python2.4/test/output/test_tokenize
missing /usr/lib/python2.4/test/test_normalization.pyc
missing /usr/lib/python2.4/test/test_normalization.pyo
missing /usr/lib/python2.4/test/test_zipfile.py
missing /usr/lib/python2.4/test/test_zipfile.pyc
missing /usr/lib/python2.4/test/test_zipfile.pyo
missing /usr/lib/python2.4/test/test_zipimport.py
missing /usr/lib/python2.4/test/test_zipimport.pyc
missing /usr/lib/python2.4/test/test_zipimport.pyo

root@linux:~ # rpm -V python-sqlite-1.1.7-1.2.1

root@linux:~ # rpm -V python-numeric-23.7-2.2.2.el5_6.1

root@linux:~ # rpm -V python-iniparse-0.2.3-4.el5

root@linux:~ # rpm -V python-elementtree-1.2.6-5

root@linux:~ # rpm -V python-libs-2.4.3-44.el5_7.1
missing /usr/lib64/python2.4/_MozillaCookieJar.py
missing /usr/lib64/python2.4/_MozillaCookieJar.pyc
missing /usr/lib64/python2.4/_MozillaCookieJar.pyo
missing /usr/lib64/python2.4/tokenize.py
missing /usr/lib64/python2.4/tokenize.pyc
missing /usr/lib64/python2.4/tokenize.pyo
missing /usr/lib64/python2.4/tzparse.py
missing /usr/lib64/python2.4/tzparse.pyc
missing /usr/lib64/python2.4/tzparse.pyo
missing /usr/lib64/python2.4/zipfile.py
missing /usr/lib64/python2.4/zipfile.pyc
missing /usr/lib64/python2.4/zipfile.pyo

root@linux:~ # rpm -V python-dmidecode-3.10.13-1.el5_5.1

There was a problem importing one of the Python modules required to run yum

I had a problem with the server and then yum was not running

root@linux:~ # yum whatprovides libbz2.so.1
There was a problem importing one of the Python modules
required to run yum. The error leading to this problem was:

libbz2.so.1: cannot open shared object file: No such file or directory

Please install a package which provides this module, or
verify that the module is installed correctly.

It’s possible that the above module doesn’t match the
current version of Python, which is:
2.4.3 (#1, Aug 29 2011, 10:55:55)
[GCC 4.1.2 20080704 (Red Hat 4.1.2-51)]

If you cannot solve this problem yourself, please go to
the yum faq at:
http://wiki.linux.duke.edu/YumFaq

I ran python manually and tried to import the module

root@linux:~ # python
Python 2.4.3 (#1, Aug 29 2011, 10:55:55)
[GCC 4.1.2 20080704 (Red Hat 4.1.2-51)] on linux2
Type “help”, “copyright”, “credits” or “license” for more information.
>>> import yum
Traceback (most recent call last):
File “”, line 1, in ?
File “/usr/lib/python2.4/site-packages/yum/__init__.py”, line 23, in ?
import rpm
File “/usr/lib64/python2.4/site-packages/rpm/__init__.py”, line 7, in ?
from _rpm import *
ImportError: libbz2.so.1: cannot open shared object file: No such file or directory

Seeing other server, I needed this two files

root@other_linux:~ # find / -name libbz2.so.1
/usr/lib/libbz2.so.1
/usr/lib64/libbz2.so.1

Which are a link

root@linux:~ # ls -l /usr/lib/libbz2.so.1
lrwxrwxrwx 1 root root 15 Mar 14 11:09 /usr/lib/libbz2.so.1 -> libbz2.so.1.0.3
root@linux:~ # ls -l /usr/lib64/libbz2.so.1
lrwxrwxrwx 1 root root 15 Mar 14 11:10 /usr/lib64/libbz2.so.1 -> libbz2.so.1.0.3

They didn’t exist in the server

root@other_linux:~ # ls -l /usr/lib/libbz2.so.1.0.3
-rwxr-xr-x 1 root root 71852 Sep 20 2010 /usr/lib/libbz2.so.1.0.3
root@other_linux:~ # ls -l /usr/lib64/libbz2.so.1.0.3
-rwxr-xr-x 1 root root 67792 Sep 20 2010 /usr/lib64/libbz2.so.1.0.3

root@linux:~ # ls -l /usr/lib/libbz2.so.1.0.3
ls: /usr/lib/libbz2.so.1.0.3: No such file or directory
root@linux:~ # ls -l /usr/lib64/libbz2.so.1.0.3
ls: /usr/lib64/libbz2.so.1.0.3: No such file or directory

The package bzip2-libs provide the files. Download it and install the package with rpm and try to run yum again

root@other_linux:~ # yum whatprovides /usr/lib/libbz2.so.1.0.3
Loaded plugins: downloadonly, rhnplugin, security
Importing additional filelist information
repository/filelists_db | 40 MB 00:04
bzip2-libs-1.0.3-3.i386 : Libraries for applications using bzip2
Repo : repository
Matched from:
Filename : /usr/lib/libbz2.so.1.0.3

bzip2-libs-1.0.3-6.el5_5.i386 : Libraries for applications using bzip2
Repo : repository
Matched from:
Filename : /usr/lib/libbz2.so.1.0.3

bzip2-libs-1.0.3-4.el5_2.i386 : Libraries for applications using bzip2
Repo : repostory
Matched from:
Filename : /usr/lib/libbz2.so.1.0.3

bzip2-libs-1.0.3-6.el5_5.i386 : Libraries for applications using bzip2
Repo : repository
Matched from:
Other : Provides-match: /usr/lib/libbz2.so.1.0.3

Error updating RHEL package: Cannot retrieve repository metadata for repository: rhel-x86_64-server-5

I made a local repository on my network to avoid updating the package through the internet. But my system was giving me the following error

root@linux:~ # yum update nscd
Loaded plugins: rhnplugin, security
Error: Cannot retrieve repository metadata (repomd.xml) for repository: rhel-x86_64-server-5. Please verify its path and try again

To solve this problem, I disabled the rhnplugin

root@linux:~ # vi /etc/yum/pluginconf.d/rhnplugin.conf
[main]
enabled = 0
gpgcheck = 1

# You can specify options per channel, e.g.:
#
#[rhel-i386-server-5]
#enabled = 1
#
#[some-unsigned-custom-channel]
#gpgcheck = 0

%d bloggers like this: