when I use yum to install a package in centos, the error No module named '_repo' came out, what should I do to fix it?
thank you
well, there is not much info in the question. but still, I will try to provide you some tricks and solution,
first, find which package provides '_repo'
yum whatprovides _repo
install the dependency first (here it is _repo)
yum install _repo
if yum throws an error, use following command to rebuild the yum cache,
yum clean all
yum makecache fast
and then try 1 and 2 points again.
Related
I'm trying to do yum update on my centos 7 server but i'm getting the following error:
Error: Multilib version problems found. This often means that the root
cause is something else and multilib version checking is just
pointing out that there is a problem. Eg.:
1. You have an upgrade for grub2-tools which is missing some
dependency that another package requires. Yum is trying to
solve this by installing an older version of grub2-tools of the
different architecture. If you exclude the bad architecture
yum will tell you what the root cause is (which package
requires what). You can try redoing the upgrade with
--exclude grub2-tools.otherarch ... this should give you an error
message showing the root cause of the problem.
2. You have multiple architectures of grub2-tools installed, but
yum can only see an upgrade for one of those architectures.
If you don't want/need both architectures anymore then you
can remove the one with the missing update and everything
will work.
3. You have duplicate versions of grub2-tools installed already.
You can use "yum check" to get yum show these errors.
...you can also use --setopt=protected_multilib=false to remove
this checking, however this is almost never the correct thing to
do as something else is very likely to go wrong (often causing
much more problems).
Protected multilib versions: 1:grub2-tools-2.02-0.64.el7.centos.x86_64 != 1:grub2-tools-2.02-0.44.el7.centos.x86_64
Can someone help me solve this?
I encountered the same problem, due to abnormal stop of yum update process.
I solve by removing grub2-tools and then re-install it, skipping the multilib check.
Specifically here's what I did:
[CAUTION! Use at your own risk ]
yum remove grub2-tools
yum install grub2 --setopt=protected_multilib=false
yum clean all
yum update
I manually download a higher version of grub2-tools (the 2.02-0.64) from
https://www.rpmfind.net/linux/rpm2html/search.php?query=grub2-tools&submit=Search+...&system=&arch=
And then I've manually installed it
rpm -ivh grub2-tools-2.02-0.64.el7.centos.x86_64.rpm
The process failed by dependencies, as it needed grub2-common at least same version (2.02-0.64), so I manually download also, and manually install bot
rpm -ivh grub2-common-2.02-0.64.el7.centos.noarch.rpm
rpm -ivh grub2-tools-2.02-0.64.el7.centos.x86_64.rpm
So the problem seems resolved.
I am trying to install a package on CentOS, but it throws error when I run the "yum" command. The internet connection is working fine.
I try to yum clean all but problem persist.
Error:
[root#dcos-master3 ~]# yum install ntp
Loaded plugins: fastestmirror
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. 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/$releasever/x86_64
My yum repolist is the next:
[root#dcos-master3 ~]# yum repolist list
Loaded plugins: fastestmirror
https://yum.dockerproject.org/repo/main/centos/%24releasever/repodata/repomd.xml: [Errno 14] HTTPS Error 403 - Forbidden
Trying other mirror.
To address this issue please refer to the below knowledge base article
https://access.redhat.com/solutions/69319
If above article doesn't help to resolve this issue please create a bug on https://bugs.centos.org/
repolist: 0
If I list the repolist:
[root#dcos-master3 ~]# yum repolist
Loaded plugins: fastestmirror
https://yum.dockerproject.org/repo/main/centos/%24releasever/repodata/repomd.xml: [Errno 14] HTTPS Error 403 - Forbidden
Trying other mirror.
To address this issue please refer to the below knowledge base article
https://access.redhat.com/solutions/69319
If above article doesn't help to resolve this issue please create a bug on https://bugs.centos.org/
repo id repo name status
base/$releasever/x86_64 CentOS-$releasever - Base 0
dockerrepo/$releasever Docker Repository 0
extras/$releasever/x86_64 CentOS-$releasever - Extras 0
updates/$releasever/x86_64 CentOS-$releasever - Updates 0
repolist: 0
BEFORE TRYING ANY OF THIS, HAVE A BACKUP OF YOUR MACHINE, YOU COULD DAMAGE YOUR OS MORE/COMPLETELY
It seems that your yum variable $releasever is somehow corrupt,
it usually is caused by missing centos-release package on the machine for some obscure reasons.
You can check if you have the package by:
rpm -qi centos-release
You will probably see:
"package centos-release is not installed"
First find out the exact centos version that you have by executing as root:
cat /etc/redhat-release
You will see something like this:
CentOS Linux release 7.3.1611 (Core)
You can fetch the centos-release package from repo by:
wget http://vault.centos.org/centos/7.3.1611/updates/x86_64/Packages/centos-release-7-3.1611.el7.centos.2.5.x86_64.rpm
Now run reinstall centos-release package via rpm:
sudo rpm -Uvh --replacepkgs centos-release-7-3.1611.el7.centos.2.5.x86_64.rpm
As next you can try to install something with yum and you might get:
[root#dcos-master3 ikerlan]# sudo yum install wget
error: db5 error(-30969) from dbenv->open: BDB0091 DB_VERSION_MISMATCH: Database environment version mismatch
error: cannot open Packages index using db5 - (-30969)
error: cannot open Packages database in /var/lib/rpm
CRITICAL:yum.main:
Error: rpmdb open failed
Now you can try to reboot the machine or try to use the following command to rebuild the rpm db:
rpm --rebuilddb
I came across the same issue while downloading some packages in centos 7. After days of search, I found the solution:
Go to the yum repo directory.
cd /etc/yum.repos.d.
Make a copy of the CentOS-Base.repo file.
cp CentOS-Base.repo CentOS-Base.repo.old
Edit the CentOS-Base.repo file. Comment mirrorlist and uncomment baseurl.
vi CentOS-Base.repo
[base]
name=CentOS-$releasever - Base
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os&infra=$infra
baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
Now when you use yum, do the following.
sudo yum --disablerepo=* --enablerepo=base install httpd
Likewise for yum update.
sudo yum --disablerepo=* --enablerepo=base install httpd
It should work now.
I ran into this problem when attempting to install MariaDB on CentOS 7. I was super frustrated and after much searching found the answer at this link.
Here is what fixed this problem for me. Run as root.
# yum --disablerepo "*" --enablerepo epel install [package]
# yum clean all
"epel" can be whatever repo you like, but this one worked for me. Place [package] in the command just as written, not what package you are trying to install.
After you run the above, exit root and run whatever install you were attempting before encountering the error.
I noticed that in the failing url, your $releasever is %24releasever, but it should be 7 or 7.14.xx. Please check your yum config file at /etc/yum/var, or search in every .repo file, to see what is its value. It may be corrupted.
See Red Hat documentation for more information about how to set these variables.
https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/6/html/deployment_guide/sec-using_yum_variables
yum install http://rpms.remirepo.net/enterprise/remi-release-7.rpm -y
yum -y install yum-utils
yum-config-manager --enable remi-php74
Then proceed to your installation/updates/etc
Always make sure NAT is active on your centos7. Specially when there is a VMnet2 for host. Because sometimes VMNet2 can be active instead of NAT and because of that you will not be able to connect to the internet through centos7. This is just a one reason for getting that error.
On my VPS mediatemple server with cPanel/whm, I've tried every which way installing Sphinx with yum as well as doing rpm -Uvc with a local download.
And it always returns these errors:
Error: Package: sphinx-2.2.10-1.rhel6.i386 (/sphinx-2.2.10-1.rhel6.i386)
Requires: libmysqlclient.so.16(libmysqlclient_16)
Error: Package: sphinx-2.2.10-1.rhel6.i386 (/sphinx-2.2.10-1.rhel6.i386)
Requires: libmysqlclient.so.16
I can see that I have these files are located at /usr/lib64/libmysqlclient.so.16, but it keeps throwing this error. I read that I was missing MySQL-community-libs-compat files, I tried but MySQL installation is handled through cpanel and got conflicting notices.
I had previously installed Sphinx 2.2.9 wiht no issues, and went ahead and removed it to upgrade. Now I can't install anything. No Bueno!
Can anyone help??
Did you try ?
yum install mysql mysql-devel mysql-lib
Always install local packages using yum , e.g. yum local install LocalPackage.rpm. Yum can handle package dependencies.
Remove sphinx and reinstall using yum localinstall .
I currently have a problem with rpmlib(fileDigest) and (PayloadIsXz) I've searched on Google and other websites, including SO without luck (that worked). This is basically what I do:
wget http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-7.noarch.rpm
rpm -ivh epel-release-6-7.noarch.rpm
And this is what it spits out:
[root#XXX ~]# rpm -ivh epel-release-6-7.noarch.rpm
warning: epel-release-6-7.noarch.rpm: Header V3 RSA/SHA256 signature:
NOKEY, key ID 0608b895 error: Failed dependencies:
rpmlib(FileDigests) <= 4.6.0-1 is needed by epel-release-6-7.noarch
rpmlib(PayloadIsXz) <= 5.2-1 is needed by epel-release-6-7.noarch
I've searched on Google for those two, but it didn't quite help.
Note: uname -m gives "i686" if that's any help.
As well as I run CentOS 6.3
I know it may seem super silly but try:
yum upgrade
and run the installation again
and instead of using rpm, try a yum:
yum localinstall /path/to/your/rpm/epel-release-6-7.noarch.rpm
Yum will try to automatically resolve dependencies, where rpm wont. not 100% sure that will fix it, but definitely something to try :)
I'm working on a 64 bit centos 5.5 (Final) server
When I try to install pear it gives a dependency error
php-devel-5.1.6-27.el5_5.3.x86_64 from base has depsolving problems
--> Missing Dependency: php = 5.1.6-27.el5_5.3 is needed by package php-devel-5.1.6-27.el5_5.3.x86_64 (base)
So I try "yum install php-common-5.1.6-27.el5_5.3" it says that this package is already installed
Package matching php-common-5.1.6-27.el5_5.3.x86_64 already installed. Checking for update.
Nothing to do
I don't know what to do anymore
Can anyone give me a tip?
It's driving me crazy
when I try yum remove php-common-5.1.6-27.el5_5.3.x86_64 it gives me the following
Package(s) php-common-5.1.6-27.el5_5.3.x86_64 available, but not installed.
I don't understand what's wrong with yum
Try removing PHP and Pear, then try this from scratch as if your OS was new. It may help. Pear's a pain sometimes...
# yum install php
# yum install php-pear
# pear channel-update pear.php.net
# pear upgrade-all
Good luck!!
to refresh your system, you might try
yum reinstall php-common; yum install php-devel