Error : PyYAML is needed by ansible
Error : PyYAML is needed by ansible
Got the above error while installing Ansible on my Fedora server. Do the below steps to install PyYAML on Fedora server.
1. Log into your fedora31 server as ‘root ‘user or sudo user
2. Install PyYAML using dnf command
# dnf install python3-pyyaml
OR
# dnf install PyYAML
3. Enter ‘y’ and press enter, if dnf ask for confirmation while installing
Last metadata expiration check: 3:14:11 ago on Sat May 16 09:04:21 2020.
Dependencies resolved.
=======================================================================
Package Architecture Version Repository Size
========================================================================
Installing:
python3-pyyaml x86_64 5.3.1-1.fc31 updates 208 k
Transaction Summary
=======================================================================
Install 1 Package
Total download size: 208 k
Installed size: 693 k
Is this ok [y/N]: y
How to install python3-pyyaml using rpm
1. Log into Fedora31 x86_64 Server as ‘root’ user
2. Download python3-pyyaml rpm file from fedoraproject.org website using wget command
wget https://download-ib01.fedoraproject.org/pub/fedora/linux/releases/31/Everything/x86_64/os/Packages/p/python3-pyyaml-5.1.2-1.fc31.x86_64.rpm
3. You can Install python3-pyyaml either using rpm command or dnf command
OR
# dnf install python3-pyyaml-5.1.2-1.fc31.x86_64.rpm
Dnf command will install the package ‘python3-pyyaml’ and the required dependencies.
You must manually install the dependencies, if you’re installing using rpm command.
The below dependencies are required before installing python3-pyyaml package.
libc.so.6()(64bit)
libpython3.7m.so.1.0()(64bit)
libyaml-0.so.2()(64bit)