I am try to install the ansible tool on my linux red-hat version - 5.7
yum install ansible
Loaded plugins: security
Setting up Install Process
No package ansible available.
Nothing to do
ansible isnt installed on my linux machine - for sure!
so why I get - No package ansible available. and how to resolve this?
the view from yum.repos.d is:
/etc/yum.repos.d]# ls
rhel-debuginfo.repo rhel-source.repo service-cd-repo.repo stp-default- repo.repo
I have resolving as the following:
ping 8.8.8.8
PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.
64 bytes from 8.8.8.8: icmp_seq=1 ttl=50 time=63.4 ms
Update - try to install epel-release package
yum install epel-release
Loaded plugins: security
service-cd | 951 B 00:00
swp-default | 951 B 00:00
Setting up Install Process
No package epel-release available.
Nothing to do
second update:
wget --no-check-certificate https://dl.fedoraproject.org/pub/epel/epel- release-latest-5.noarch.rpm
--2015-08-17 14:54:20-- https://dl.fedoraproject.org/pub/epel/epel- release-latest-5.noarch.rpm
Resolving dl.fedoraproject.org... 209.132.181.26, 209.132.181.27, 209.132.181.25, ...
Connecting to dl.fedoraproject.org|209.132.181.26|:443... connected.
WARNING: cannot verify dl.fedoraproject.org's certificate, issued by `/C=US/O=DigiCert Inc/OU=www.digicert.com/CN=DigiCert SHA2 Hig:
Unable to locally verify the issuer's authority.
HTTP request sent, awaiting response... 200 OK
Length: 12232 (12K) [application/x-rpm]
Saving to: `epel-release-latest-5.noarch.rpm'
100% [==========================================================================================>] 12,232 54.0K/s in 0.2s
2015-08-17 14:54:22 (54.0 KB/s) - `epel-release-latest-5.noarch.rpm.1' saved [12232/12232]
rpm -ivh epel-release-latest-5.noarch.rpm
warning: epel-release-latest-5.noarch.rpm: Header V3 DSA signature: NOKEY, key ID 217521f6
Preparing... ########################################### [100%]
yum repolist
Loaded plugins: security
epel | 3.7 kB 00:00
service-cd | 951 B 00:00
swp-default | 951 B 00:00
repo id repo name status
epel Extra Packages for Enterprise Linux 5 - i386 5,411
service-cd RHEL5 service-cd repository 155
swp-default RHEL5 yum repository 239
repolist: 5,805
yum install ansible
Loaded plugins: security
Setting up Install Process
No package ansible available.
Nothing to do
Ansible is part of the Extra Packages for Enterprise Linux (EPEL) repository so you need to install epel-release package first
$ sudo yum install epel-release
The repo should now be visible in the repo list
$ sudo yum repolist
So now you can go ahead and install ansible
$ sudo yum install ansible
Before RHEL 7.x, the installtion needed to be done manually.
Open install epel-release package and download the newest version of epel-release for EL5 or follow the commands below
$ wget https://archives.fedoraproject.org/pub/archive/epel/5/x86_64/epel-release-5-4.noarch.rpm
$ sudo rpm –ivh epel-release-latest-5.noarch.rpm
$ sudo yum repolist
$ sudo yum install ansible
In the installation manual for ansible, this is referred to as configure EPEL
Hope this helps :)
Response to second update
When installing manually you may also need to expire your cache and recreate the the local repository database before you can install software from EPEL. That can be done with the following
$ yum clean expire-cache
$ yum createrepo
EPEL is required for this.
Follow these steps for installing Ansible for Red Hat Enterprise Linux Server release 7
Based on the redhat version, follow
Enabline EPEL
1. yum -y update
2. yum install wget
3. wget http://dl.fedoraproject.org/pub/epel/7/x86_64/Packages/e/epel-release-7-11.noarch.rpm
4. rpm -ivh epel-release-7-11.noarch.rpm
5. yum repolist
6. yum install ansible
Related
In various online tutorials, I found that I could have downloaded and installed LDAP and related packages with the following command.
yum install -y openldap openldap-clients openldap-servers
But after I execute this command, I only get the reports: "no package available".
# yum install -y openldap openldap-clients openldap-servers
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* epel: hkg.mirror.rackspace.com
No package openldap-clients available.
No package openldap-servers available.
Nothing to do.
It looks like I have successfully installed openldap, but actually I downloaded openldap via wget url, and the openldap-server and openldap-client are not installed.
My epel version is 7-14. I checked it through the yum list command, and I did not find the LDAP package that I was looking for.
# yum list | grep openldap
openldap.x86_64 2.4.44-22.el7 #anaconda
collectd-openldap.x86_64 5.8.1-1.el7 epel
So how can I install openldap-clients and openldap-servers?
Thanks for any help!
I have been constantly running into this issue more and more lately, and finally need some assistance because I'm completely stuck.
I just got access to a RHEL EC2 Linux server and I am just simply trying to install Docker. This process has been extremely painful lately. Tons of 404 HTTP Not Found errors when trying to follow the processes mentioned online
According to https://docs.aws.amazon.com/AmazonECS/latest/developerguide/docker-basics.html, you can just simply run one of the following two commands:
sudo amazon-linux-extras install docker
sudo yum install docker
However, neither one of these comands work, as shown in the output below:
[root#d8de679d27f2454 myuser]# sudo amazon-linux-extras install docker
sudo: amazon-linux-extras: command not found
[root#d8de679d27f2454 myuser]# yum install docker
Loaded plugins: amazon-id, search-disabled-repos
No package docker available.
Error: Nothing to do
[root#d8de679d27f2454 myuser]#
Here is a list of things I've tried to do :
First Attempt (RE: How to install docker on Amazon Linux2)
The second answer proposed in that you can just run the following:
sudo yum update -y
sudo yum -y install docker
However, that doesn't work either, as shown in the output below:
[root#d8de679d27f2454 myuser]# yum update -y
Loaded plugins: amazon-id, search-disabled-repos
No packages marked for update
[root#d8de679d27f2454 myuser]# yum -y install docker
Loaded plugins: amazon-id, search-disabled-repos
No package docker available.
Error: Nothing to do
[root#d8de679d27f2454 myuser]#
Second Attempt: Installing via get.docker.com
When running curl https://get.docker.com | bash, that doesn't work either
Third Attempt: https://computingforgeeks.com/install-docker-ce-on-rhel-7-linux/
Part of this article suggests running the following two commands:
sudo yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
sudo yum install -y yum-utils device-mapper-persistent-data lvm2
However, that doesn't work either:
# yum install -y yum-utils device-mapper-persistent-data lvm2
Loaded plugins: amazon-id, product-id, search-disabled-repos, subscription-manager
This system is not registered with an entitlement server. You can use subscription-manager to register.
https://download.docker.com/linux/rhel/7/x86_64/stable/repodata/repomd.xml: [Errno 14] HTTPS Error 404 - Not Found
Trying other mirror.
To address this issue please refer to the below knowledge base article
https://access.redhat.com/articles/1320623
If above article doesn't help to resolve this issue please open a ticket with Red Hat Support.
One of the configured repositories failed (Docker CE Stable - x86_64),
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=docker-ce-stable ...
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 docker-ce-stable
or
subscription-manager repos --disable=docker-ce-stable
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=docker-ce-stable.skip_if_unavailable=true
failure: repodata/repomd.xml from docker-ce-stable: [Errno 256] No more mirrors to try.
https://download.docker.com/linux/rhel/7/x86_64/stable/repodata/repomd.xml: [Errno 14] HTTPS Error 404 - Not Found
Here's the output of my cat /etc/os-release command
NAME="Red Hat Enterprise Linux Server"
VERSION="7.9 (Maipo)"
ID="rhel"
ID_LIKE="fedora"
VARIANT="Server"
VARIANT_ID="server"
VERSION_ID="7.9"
PRETTY_NAME="Red Hat Enterprise Linux Server 7.9 (Maipo)"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:redhat:enterprise_linux:7.9:GA:server"
HOME_URL="https://www.redhat.com/"
BUG_REPORT_URL="https://bugzilla.redhat.com/"
Any help would be greatly appreciated. It seems nearly impossible to install docker at this point.
Ran the following commands and this worked:
yum install -y https://download.docker.com/linux/centos/7/x86_64/stable/Packages/docker-ce-selinux-17.03.0.ce-1.el7.centos.noarch.rpm
yum install -y https://download.docker.com/linux/centos/7/x86_64/stable/Packages/docker-ce-17.03.0.ce-1.el7.centos.x86_64.rpm
Download latest version of these 3 packages from internet and
[root#test_hostame docker19.03_rpm]# ll
total 93904
-rw-r--r-- 1 root root 30381608 Jan 20 18:19 containerd.io-1.3.9-3.1.el7.x86_64.rpm
-rw-r--r-- 1 root root 25519432 Jan 20 18:19 docker-ce-19.03.14-3.el7.x86_64.rpm
-rw-r--r-- 1 root root 40247412 Jan 20 18:19 docker-ce-cli-19.03.14-3.el7.x86_64.rpm
run command in folder where only these 3 packages are present
yum localinstall *rpm
It is surely gonna work. If it doesnt, share your error.
I tried to install httpd-devel rpm package by using yum without internet access.
I downloaded dependencies rpm packages by using --downloadonly option of yum on other coumptuer,
and then I move rpm packages what I downlaoded to the machine what I want to install httpd_devel.
this is centos 6.8 release version.
I expect to install currently. but the machine showed error message bellow.
Running
yum install -y httpd-devel-2.2.15-69.el6.centos.x86_64.rpm
gives this output:
Loaded plugins: fastestmirror, refresh-packagekit, security
Setting up Install Process
Examining httpd-devel-2.2.15-69.el6.centos.x86_64.rpm: httpd-devel-2.2.15-69.el6.centos.x86_64
Marking httpd-devel-2.2.15-69.el6.centos.x86_64.rpm to be installed
Loading mirror speeds from cached hostfile
Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=6&arch=x86_64&repo=os&infra=stock error was
14: PYCURL ERROR 6 - "Couldn't resolve host 'mirrorlist.centos.org'"
Error: Cannot find a valid baseurl for repo: base
yum tries to refresh its repositories which won't work without internet. I see two solutions:
1) tell yum not to look at any of its configured repositories:
yum --disablerepo="*" install -y httpd-devel-2.2.15-69.el6.centos.x86_64.rpm
2) use rpm directly; don't use yum:
rpm -Ivh httpd-devel-2.2.15-69.el6.centos.x86_64.rpm
I was trying to install mongodb#3.4 via yum on my server by following the steps on MongoDB Doc. First, I created a file called mongodb-org-3.4.repo in /etc/yum.repos.d/ directory and copied the text as below.
[mongodb-org-3.4]
name=MongoDB Repository
baseurl=https://repo.mongodb.org/yum/amazon/2013.03/mongodb-org/3.4/x86_64/
gpgcheck=1
enabled=1
gpgkey=https://www.mongodb.org/static/pgp/server-3.4.asc
Then I tried sudo yum install mongodb-org but got an error on it.
Loaded plugins: priorities, update-motd, upgrade-helper
amzn-main | 2.1 kB 00:00
amzn-updates | 2.3 kB 00:00
https://repo.mongodb.org/yum/redhat/latest/mongodb-org/3.4/x86_64/repodata/repomd.xml: [Errno 14] HTTPS Error 404 - Not Found
Trying other mirror.
To address this issue please refer to the below knowledge base article
https://access.redhat.com/articles/1320623
If above article doesn't help to resolve this issue please open a ticket with Red Hat Support.
One of the configured repositories failed (MongoDB),
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 mongodb-org-3.4
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=mongodb-org-3.4.skip_if_unavailable=true
failure: repodata/repomd.xml from mongodb-org-3.4: [Errno 256] No more mirrors to try.
https://repo.mongodb.org/yum/redhat/latest/mongodb-org/3.4/x86_64/repodata/repomd.xml: [Errno 14] HTTPS Error 404 - Not Found
After that, I tried yum repolist and found out the status of MongoDB get 0.
Loaded plugins: priorities, update-motd, upgrade-helper
amzn-main | 2.1 kB 00:00
amzn-updates | 2.3 kB 00:00
https://repo.mongodb.org/yum/redhat/latest/mongodb-org/3.4/x86_64/repodata/repomd.xml: [Errno 14] HTTPS Error 404 - Not Found
Trying other mirror.
To address this issue please refer to the below knowledge base article
https://access.redhat.com/articles/1320623
If above article doesn't help to resolve this issue please open a ticket with Red Hat Support.
https://repo.mongodb.org/yum/redhat/latest/mongodb-org/3.4/x86_64/repodata/repomd.xml: [Errno 14] HTTPS Error 404 - Not Found
Trying other mirror.
nodesource/x86_64 | 2.5 kB 00:00
repo id repo name status
amzn-main/latest amzn-main-Base 5,668
amzn-updates/latest amzn-updates-Base 435
mongodb-org-3.4/latest MongoDB 0
nodesource/x86_64 Node.js Packages for Enterprise 61
repolist: 6,164
I wonder whether that repo is still valid or not? Thank you~
Here's my server OS version:
NAME="Amazon Linux AMI"
VERSION="2017.03"
ID="amzn"
ID_LIKE="rhel fedora"
VERSION_ID="2017.03"
PRETTY_NAME="Amazon Linux AMI 2017.03"
ANSI_COLOR="0;33"
CPE_NAME="cpe:/o:amazon:linux:2017.03:ga"
HOME_URL="http://aws.amazon.com/amazon-linux-ami/"
Amazon Linux AMI release 2017.03
Please try this,
sudo rm -rf /etc/yum.repos.d/mongod*
sudo yum clean all
again create repo file
sudo vi /etc/yum.repos.d/mongodb-org-3.4.repo
[mongodb-org-3.4]
name=MongoDB Repository
baseurl=https://repo.mongodb.org/yum/amazon/2013.03/mongodb-org/3.4/x86_64/
gpgcheck=1
enabled=1
gpgkey=https://www.mongodb.org/static/pgp/server-3.4.asc
sudo yum install -y mongodb-org
updated to March/2018
sudo nano /etc/yum.repos.d/mongodb-org-3.6.repo
add (or replace) the mongo repo configuration:
[mongodb-org-3.6]
name=MongoDB Repository
baseurl=https://repo.mongodb.org/yum/redhat/$releasever/mongodb-org/3.6/x86_64/
gpgcheck=1
enabled=1
gpgkey=https://www.mongodb.org/static/pgp/server-3.6.asc
now, you're able to do a
yum repolist
and
sudo yum install -y mongodb-org
I think you try to add exclude directory from /etc/yum.conf to prevent future updates
for example:
exclude=mongodb-org,mongodb-org-server,mongodb-org-shell,mongodb-org-mongos,mongodb-org-tools
But above line need to be added after perform install mongodb-org:
sudo yum install -y mongodb-org
So, remove the exclude line from /etc/yum.conf to make the mongodb-org package available
Purpose
I'm trying to install mongodb on EC2 AWS x86_64 GNU/Linux via Yum.
Prerequisites
I created a /etc/yum.repos.d/mongodb.repo file and tried all the available combinations for it's content found on the official documentations and on the related questions on stackoverflow link1 link2 link3, for example:
[mongodb-org-3.4]
name=MongoDB Repository
baseurl=https://repo.mongodb.org/yum/amazon/2013.03/mongodb-org/3.4/x86_64/
gpgcheck=1
enabled=1
gpgkey=https://www.mongodb.org/static/pgp/server-3.4.asc
(...tried with enabled=0, gpgcheck=0 too)
I also added a /etc/yum.conf file like this:
[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=3
Problem
I'm getting the same output when running
sudo yum install mongodb-org (or by specifying the packages sudo yum install mongo-org mongo-org-server or by specifying the versions too sudo yum install -y mongodb-org-3.2.13 mongodb-org-server-3.2.13 mongodb-org-shell-3.2.13 mongodb-org-mongos-3.2.13 mongodb-org-tools-3.2.13)
Loaded plugins: priorities, update-motd, upgrade-helper
amzn-main | 2.1 kB 00:00
amzn-updates | 2.3 kB 00:00
No package mongodb-org available.
Error: Nothing to do
Question
What am I missing? Is there any additional dependencies?
You don't need to create a new /etc/yum.repos.d/mongodb.repo or at the time of this answer /etc/yum.repos.d/mongodb-org-3.6.repo cause it already exists but it is empty.
You can check with: cat /etc/yum.repos.d/mongodb-org-3.6.repo.
all you need to do is open the file on vi editor:
$ sudo vi /etc/yum.repos.d/mongodb-org-3.6.repo
~
~
add this code to the repository file. The one i provided is for the MongoDB 3.6 but you can find the one for earlier versions in the documentation:
[mongodb-org-3.6]
name=MongoDB Repository
baseurl=https://repo.mongodb.org/yum/amazon/2013.03/mongodb-org/3.6/x86_64/
gpgcheck=1
enabled=1
gpgkey=https://www.mongodb.org/static/pgp/server-3.6.asc
To save and exit from vi editor check here or go ahead and do this:
ESC + :wq
After that you can proceed with the steps in the documentation or in the old C9 Forum, but here they are just in case:
$ sudo yum install -y mongodb-org
$ sudo mkdir -p /data/db
$ echo 'mongod --bind_ip=$IP --dbpath=data --nojournal --rest "$#"' > mongod
$ chmod a+x mongod
You can start mongodb by running the mongod script on your project root:
$ ./mongod
The last command might not run the mongodb local server, and you can find the solution for that here or just go ahead and run these two commands:
$ sudo service mongod stop
$ sudo mongod
The only error I can spot is the space in "name" :
name=MongoDB Repository
With the naming changed to name=MongoDB, I did a test with CenOS 7 :
# yum search mongodb-org
Loaded plugins: fastestmirror, langpacks
base | 3.6 kB 00:00
.
mongodb-org-3.4 | 2.5 kB 00:00
updates | 3.4 kB 00:00
(1/5): mongodb-org-3.4/primary_db | 30 kB 00:00
.
=========================== N/S matched: mongodb-org ============
mongodb-org-debuginfo.x86_64 : Debug information for package mongodb-org
mongodb-org.x86_64 : MongoDB open source document-oriented database system
: (metapackage)
mongodb-org-mongos.x86_64 : MongoDB sharded cluster query router
mongodb-org-server.x86_64 : MongoDB database server
mongodb-org-shell.x86_64 : MongoDB shell client
mongodb-org-tools.x86_64 : MongoDB tools
So I guess you can now install ``mongodb-org´´.
The problem was that I wanted to do it from the default ec2_user/ home folder. You need to cd .. up to the root, and locate the etc/yum.repos.d/ folder there.
For those of you finding this error after running an ARM AMI Linux 2 image, simply install the RPMs directly from the testing repository, which is the only one that supports all binaries on Amazon AArch64:
https://repo.mongodb.org/yum/amazon/2/mongodb-org/testing/aarch64/RPMS/
For example, to install the latest mongo shell:
sudo yum install -y https://repo.mongodb.org/yum/amazon/2/mongodb-org/testing/aarch64/RPMS/mongodb-org-shell-4.4.4-0.1.rc1.amzn2.aarch64.rpm
There is a dedicated repository for AWS Linux now.
Follow the instructions from https://docs.mongodb.com/master/tutorial/install-mongodb-on-amazon/
e.g.
[mongodb-org-4.4]
name=MongoDB Repository
baseurl=https://repo.mongodb.org/yum/amazon/2/mongodb-org/4.4/x86_64/
gpgcheck=1
enabled=1
gpgkey=https://www.mongodb.org/static/pgp/server-4.4.asc
I had this happen when my install commands specified sudo yum install mongodb-org-tools-4.0.18, but yum list available | grep mongo showed only 3.6 was available. So I did sudo yum install mongodb-org-tools and that worked.
I think you try to add exclude directory from /etc/yum.conf to prevent future updates
for example:
exclude=mongodb-org,mongodb-org-server,mongodb-org-shell,mongodb-org-mongos,mongodb-org-tools
But above line need to be added after perform install mongodb-org:
sudo yum install -y mongodb-org