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
已提问 1 年前3389 查看次数
2 回答
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
专家
已回答 1 年前
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
已回答 1 年前

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则