Can someone please tell me, exactly which step is failing and if possible why it's failing?

General support questions
Post Reply
prabha_friend
Posts: 38
Joined: 2020/06/10 14:05:16

Can someone please tell me, exactly which step is failing and if possible why it's failing?

Post by prabha_friend » 2020/09/30 05:10:09

Code: Select all

sudo yum -y update &&
sudo yum -y install epel-release &&
sudo yum -y install python-pip &&
sudo yum -y install vim wget dnf&&
sudo pip install alembic ansible &&
sudo pip install --upgrade pip &&
sudo mkdir /etc/ansible &&
sudo chown astmin:astmin /etc/ansible &&
sudo echo "[starfish]" >> /etc/ansible/hosts &&
sudo echo "localhost ansible_connection=local" >> /etc/ansible/hosts &&
mkdir -p ~/ansible/playbooks
The following are the error messages in text:
One of the configured repositories failed (Unknown), and yum doesn't have enough cached data to continure. At this point the 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= ...
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
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=.skip_if_unavailable=true

Cannot retrieve metalink for repository: epel/x86_64. Please verify its path and try again
Attachments
Task_Error.PNG
Task_Error.PNG (96.02 KiB) Viewed 212 times

User avatar
KernelOops
Posts: 347
Joined: 2013/12/18 15:04:03
Location: xfs file system

Re: Can someone please tell me, exactly which step is failing and if possible why it's failing?

Post by KernelOops » 2020/09/30 06:00:14

Why are you installing dnf on CentOS 7? yum is the package manager for CentOS 7, while dnf is for CentOS 8.

Also, why install ansible via pip? just "yum install ansible" and that should bring all the required dependencies with it.
--
I love my computer - all my friends live there.
--

prabha_friend
Posts: 38
Joined: 2020/06/10 14:05:16

Re: Can someone please tell me, exactly which step is failing and if possible why it's failing?

Post by prabha_friend » 2020/09/30 06:07:00

KernelOops wrote:
2020/09/30 06:00:14
Why are you installing dnf on CentOS 7? yum is the package manager for CentOS 7, while dnf is for CentOS 8.

Also, why install ansible via pip? just "yum install ansible" and that should bring all the required dependencies with it.
Hi,
I am actually reading the below Book :
Asterisk: The Definitive Guide, 5th Edition
In that book, The author does so, that's why I have to follow him through out the entire book.

Hope you understand. Please reply. Thank you.

With Hope,
Prabhakaran

User avatar
jlehtone
Posts: 3101
Joined: 2007/12/11 08:17:33
Location: Finland

Re: Can someone please tell me, exactly which step is failing and if possible why it's failing?

Post by jlehtone » 2020/09/30 07:00:53

prabha_friend wrote:
2020/09/30 06:07:00
Hope you understand.
Yes, we understand that you don't know that the instructions that you follow are not appropriate.

They are not.

Code: Select all

# To get definition of repository that has recent version of ansible
sudo yum install centos-release-ansible-29
# To install ansible
sudo yum install ansible
That package creates the directory /etc/ansible and file /etc/ansible/hosts too.

sudo yum update is good to do regularly (but one can have ansible play that does that).

sudo yum install epel-release is ok if you need packages from the EPEL repository.

Packages
python-pip is ok if you will use pip, but there are caveats.
vim is a text editor. At least minimal version of it is installed by default. The name of the package is not "vim". See

Code: Select all

yum list vim\*
However, vim is not the only text editor; there are many in CentOS's base repository.

wget is a convenient file transfer tool and so is rsync

dnf. No. Yum is the package management system. I can't fathom why "old book" would mention dnf, if its instructions were appropriate for CentOS 7.

Code: Select all

sudo pip install ...
No. Never. You don't know what system files are affected. More importantly, package management in CentOS 7 does not know what you&pip did. That will render system unmanageable and ultimately unusable.

You can install python modules for your account with pip, but do not run as root and not to system directories.

sudo chown astmin:astmin /etc/ansible
Why? Inventory in default place is not necessary but if used, read access should be enough.

mkdir -p ~/ansible/playbooks is good; a place for your plays.

Which step?
You did give multiple commands in succession.
You should be able to see which commands did complete before the command with error.
It is way easier to see, if you give only one command at a time.
Cannot retrieve metalink for repository: epel/x86_64.
The error message is from yum. It mentions repository epel. That was installed by the second command, unless you had done it previously.

A problem might be in definition of repositories, in data that yum does cache, or in network connection.
I would start with:

Code: Select all

sudo yum --enablerepo=* clean all

prabha_friend
Posts: 38
Joined: 2020/06/10 14:05:16

Re: Can someone please tell me, exactly which step is failing and if possible why it's failing?

Post by prabha_friend » 2020/09/30 07:08:15

Hi Sir,

Thank you so much for your Detailed reply. Give me some Time.. I also will Explain my current situation to you in Detail...

I Believe you are interested to Help..

With Hope,
Prabhakaran.

prabha_friend
Posts: 38
Joined: 2020/06/10 14:05:16

Re: Can someone please tell me, exactly which step is failing and if possible why it's failing?

Post by prabha_friend » 2020/09/30 12:23:01

Okay. I have two choices:

Follow the Book
Follow the wiki.asterisk.org

Which choice will you take if you are in my position?

P.S:
I want clarify here that the book is not an old one. Just an year old...

User avatar
KernelOops
Posts: 347
Joined: 2013/12/18 15:04:03
Location: xfs file system

Re: Can someone please tell me, exactly which step is failing and if possible why it's failing?

Post by KernelOops » 2020/09/30 13:36:15

Asterisk is pretty difficult to configure properly. Its not suitable for someone who reads a book, it requires a very large commitment.

My suggestion, is to just get an asterisk distro, like FreePBX. It has a nice GUI which allows you to configure everything with a few clicks.
--
I love my computer - all my friends live there.
--

prabha_friend
Posts: 38
Joined: 2020/06/10 14:05:16

Re: Can someone please tell me, exactly which step is failing and if possible why it's failing?

Post by prabha_friend » 2020/09/30 14:04:04

Is there a proper book to learn freePBX...?

Please reply. Thank you.

With Hope,
Prabhakaran

User avatar
KernelOops
Posts: 347
Joined: 2013/12/18 15:04:03
Location: xfs file system

Re: Can someone please tell me, exactly which step is failing and if possible why it's failing?

Post by KernelOops » 2020/09/30 16:29:31

There is nothing to learn, its just a normal linux distro that you install and configure via a web GUI. Fairly easy.
--
I love my computer - all my friends live there.
--

Post Reply

Return to “CentOS 7 - General Support”