2

As I'll need to install the layrst version of Python, will need to install a particular repository - Inline with Upstream Stable (IUS) - that provides rpm packages for new versions of selected software.

If I was using CentOS 7, would run

yum -y install https://centos7.iuscommunity.org/ius-release.rpm

and then for installing Python would do something like

yum -y install python36u

If I try to run the initial command, then I get in the first command

enter image description here

Loaded plugins: extras_suggestions, langpacks, priorities, update-motd

Cannot open: https://centos7.iuscommunity.org/ius-release.rpm. Skipping.

Error: Nothing to do

and in the second

Loaded plugins: extras_suggestions, langpacks, priorities, update-motd amzn2-core | 3.7 kB 00:00:00

No package python36u available. Error: Nothing to do

All in all,

enter image description here


Considering I'm now using Amazon Linux 2,

NAME="Amazon Linux"
VERSION="2"
ID="amzn"
ID_LIKE="centos rhel fedora"
VERSION_ID="2"
PRETTY_NAME="Amazon Linux 2"
ANSI_COLOR="0;33"
CPE_NAME="cpe:2.3:o:amazon:amazon_linux:2"
HOME_URL="https://amazonlinux.com/"

Amazon 2 instead of CentOS

what would be the equivalent commands for Amazon Linux 2?

4
  • Have you to follow the CentOS steps? AFAIK Amazon Linux is based on RHEL so it might just work. Oct 15 '20 at 11:03
  • @VojtechTrefny good idea. I just updated the question with that information Oct 15 '20 at 11:19
  • Cannot open: https://centos7.iuscommunity.org/ius-release.rpm. Skipping. I think there is a problem with the URL -- it's not working, maybe the server is down temporarily? Oct 15 '20 at 11:47
  • @VojtechTrefny you're right. According to the documentation, it changed. You're welcome to write that as an answer and I'll add the screenshoots. Basically I had to run sudo yum install https://repo.ius.io/ius-release-el7.rpm https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm as stated here. Oct 15 '20 at 12:01
2
+50

Answer base on discussion with @Tiago in the comments to help other with similar issue: Amazon Linux is based on CentOS 7 so the repository should work there. The repository has been moved https://repo.ius.io/ius-release-el7.rpm so the correct command to enable is

sudo yum install https://repo.ius.io/ius-release-el7.rpm https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm

enter image description here

Once you install it, you can run the following command just fine

yum -y install python36u

enter image description here

Source: https://ius.io/setup

2
  • I can only give the bounty in 20h. Rest assured that's gonna go to you. Thank you! Oct 15 '20 at 13:24
  • 1
    Don't worry, I'm not doing it for the bounty. Oct 15 '20 at 13:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.