How to install dnf in amazon linux 2?

0

Yum only supports python 3.7 packages. I need 3.9.16-1.amzn2023.0.3, it's available to install only through dnf as far as I am aware.

YUM is pointed to 3.7, DNF --> 3.9

Kindly provide support to use DNF or please let me know how to install python3-tkinter.x86_64 for python 3.9. Which is available in the link below.

https://docs.aws.amazon.com/fr_fr/linux/al2023/release-notes/all-packages-AL2023.1-2023.1.20230628.html#list-packages

Tim
asked 10 months ago2982 views
2 Answers
0

Hi. How about installing dnf not via yum but via rpm. I found the Japanese article which installs dnf to AL2. Hope this article will help you.(please translate it) https://qiita.com/deracio/items/db6a95be6bc5f795a968

profile picture
EXPERT
answered 10 months ago
0

For DNF I have not been able to get it work on Amazon Linux 2 however, I have been able to install python3.9 on it. You can follow the steps below and revert.

  1. sudo yum update
  2. sudo yum upgradew
  3. get https://www.python.org/ftp/python/3.9.15/Python-3.9.15.tgz
  4. ls -la
  5. tar xzf Python-3.9.15.tgz
  6. ls -la
  7. cd Python-3.9.15/
  8. sudo ./configure --enable-optimizations
  9. sudo make altinstall

1). check python versions and their directories whereis python3

2). test python3.9 by using it python3.9

3). Set python3 version variable alternatives --set python /usr/bin/python3.9

4). Check the python3.9 version python3 -V

or python3 --version

profile picture
answered 10 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions