No package s3cmd available - centos

I am trying to install an s3cmd rpm on my CentOS 6.x by using the command yum install s3cmd but I am getting the following error output :
Loaded plugins: fastestmirror, refresh-packagekit, security
Setting up Install Process
Loading mirror speeds from cached hostfile
* base: centos.mirror.net.in
* extras: centos.mirror.net.in
* updates: centos.mirror.net.in
No package s3cmd available.
Error: Nothing to do
Can somebody provide me URL from where I could manually download s3cmd rpm or any other solution for this?

The s3tools repos are empty now. Please get it from the EPEL repository instead, which I am able to keep maintained.
$ sudo yum --enablerepo=epel install s3cmd

I resolved this problem using following steps :-
cd /etc/yum.repos.d
wget http://s3tools.org/repo/RHEL_6/s3tools.repo
yum install s3cmd

You can also download the package from this url, and then install it manually via command
yum localinstall s3cmd-2.0.2-1.el7.noarch.rpm

Related

CentOS 7 - Correctly add local package to yum repository

I'm trying to add a local RPM package to yum and yet install it.
To add it to yum repository I run: yum-config-manager --add-repo file:///path/to/local/package.rpm and then yum install package to install it. However, I got this output:
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
* base: ftp.rrzn.uni-hannover.de
* epel: mirror.23media.de
* extras: centos.mirrors.psw.services
* nux-dextop: mirror.li.nux.ro
* updates: mirror.ratiokontakt.de
harbottle.gitlab.io_harbottle-main_7_x86_64_ | 2.9 kB 00:00:00
file:///path/to/local/package.rpm/repodata/repomd.xml: [Errno 14] curl#37 - "Couldn't open file /path/to/local/package.rpm/repodata/repomd.xml"
Trying other mirror.
One of the configured repositories failed (added from: file:/path/to/local/package.x86_64.rpm),
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=path_to_local_package.x86_64.rpm ...
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 path_to_local_package.x86_64.rpm
or
subscription-manager repos --disable=path_to_local_package.x86_64.rpm
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=path_to_local_package.x86_64.rpm.skip_if_unavailable=true
failure: repodata/repomd.xml from path_to_local_package.x86_64.rpm: [Errno 256] No more mirrors to try.
file:/path/to/local/package.x86_64.rpm/repodata/repomd.xml: [Errno 14] curl#37 - "Couldn't open file /path/to/local/package.rpm/repodata/repomd.xml"
I also tried to first run: yum-config-manager --add-repo file:///path/to/local/package.rpm and then createrepo --database /path/to/local/ but I got the same output.
Does anybody know how to correctly add a local RPM package to the yum repository?
Thanks!
a repository is different from a rpm package. A repository is a directory containing multiple rpms. So if you just want to install your rpm; you can just
yum install /path/to/package.rpm
if you want to start hosting your own repository; then you need to look into createrepo. For example a local directory can be turned into a repository like this:
mkdir /myrepo
cp package.rpm /myrepo
cd /myrepo
createrepo .
now you can add this directory to yum:
yum-config-manager --add-repo file:///myrepo
now you can also keep adding rpms to this directory (don't forget to run createrepo each time).

davfs2 package not found on CENTOS 7.3 x86_64

I'm having some issues trying to install davfs2 on my CentOS server, I run
yum install davfs2
but I get this:
Loaded plugins: fastestmirror, langpacks, priorities, universal-hooks
Loading mirror speeds from cached hostfile
* EA4: 91.197.228.252
* cpanel-addons-production-feed: 91.197.228.252
* base: centos.quelquesmots.fr
* centosplus: centos.mirror.fr.planethoster.net
* extras: centos.quelquesmots.fr
* rpmforge: mirrors.ircam.fr
* updates: centos.quelquesmots.fr
Nothing to do
Not sure but maybe I need add more mirrors to my distro, if it's not possible install davfs2 I'd like to know other alternative for mount webdav routes as folder in CentOS, cadaver is a webdav client but I can't mount folders with it...
thank you guys, have a nice day
You have to enable the EPEL repo in order to install that package:
yum -y install epel-release
yum -y install davfs2
After you're done installing the required packages please disable the epel repo since you are on a cPanel server and this additional repo, at some point might break some package dependencies when cPanel/WHM nightly update is running.
To disable the EPEL repo you can edit /etc/yum.repos.d/epel.repo file and replace enabled=1 with enabled=0

yum local install to install a package with its dependency

I have downloaded a package with it's dependency and want to install a package with dependency. Even though i have download in local folder it's checking for online.
sudo yum -y --disablerepo=* localinstall autoconf-2.69-11.el7.noarch.rpm
I am trying above command but failed to load it's dependency that is there in same folder.
Thanks,
Hare
Inside the local directory where you have all the downloaded RPMs, do this:
sudo yum --disablerepo=* localinstall *.rpm
OR
sudo yum --disablerepo=* localinstall foo.rpm bar.rpm baz.rpm
Since you have downloaded all the dependencies to a single directory, you can also use rpm to install those:
sudo rpm -Uvvh *.rpm --test
--test does a dry-run. Remove it to install on disk.
Even if the solution provide by iamauser is very great (and I am using it all the time), I wish to give you an other way to do it.
It exists yum-downloader command which doing basically the same thing for you.
# yumdownloader <package> --resolve
You just have to download it first :
# yum install yum-utils
Overall, I suggest you to read this article from Red Hat company site's which details everything about those two methods :
https://access.redhat.com/solutions/10154

centos yum fails installing anything or updating system

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.

yum install php-bcmath Requires: php-common(x86-64) = 5.3.3-22.el6

Im running centos 6, and I tried to:
yum install php-bcmath, i got this error:
yum install php-bcmath
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: mirror.checkdomain.de
* epel: mirror.de.leaseweb.net
* extras: mirror.checkdomain.de
* rpmforge: mirror.de.leaseweb.net
* updates: mirror.checkdomain.de
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package php-bcmath.x86_64 0:5.3.3-22.el6 will be installed
--> Processing Dependency: php-common(x86-64) = 5.3.3-22.el6 for package: php-bcmath-5.3.3-22.el6.x86_64
--> Finished Dependency Resolution
Error: Package: php-bcmath-5.3.3-22.el6.x86_64 (base)
Requires: php-common(x86-64) = 5.3.3-22.el6
Installed: php-common-5.4.9-1.el6.remi.x86_64 (#remi-test)
php-common(x86-64) = 5.4.9-1.el6.remi
Available: php-common-5.3.3-22.el6.x86_64 (base)
php-common(x86-64) = 5.3.3-22.el6
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest
Please help,
Thanks
I found out problem comes from the new PHP version (5.4, 5.4), which installed in a separate repo.
So, we just need to install php-bcmath in the main repo (version 5.3) using command:
yum install php-bcmath --enablerepo=remi
With "remi" is the main repo, you can see it by go to /etc/yum.repos.d then using ll
My Server was running PHP 5.6 and the below command solved my issue
sudo yum -y install php56-bcmath
sudo service httpd restart
It may sound stupid, but it made me lost few hours (yeah, i know..) but do not forget:
sudo service httpd graceful
after:
yum install php-bcmath
You can try (for Centos 6.4)
rpm -Uvh http://mirror.webtatic.com/yum/el6/latest.rpm
yum install php54w
yum install yum-plugin-replace
yum replace php-common --replace-with=php54w-common
yum install php54w-bcmath
(source: http://www.webtatic.com/packages/php54/)
But it may cause another problem about versions.
The simple way is uninstall php 5.4 (or 5.5),
install php 5.3, install php-bcmatch then update to php5.4 (or newer)