1

I am trying to move my application to run on Amazon Linux 2(AL2) ami which used to run on Amazon Linux 1. While trying to install the dependency of python26-virtualenv package, i am getting this error:

[root@ip-10-186-34-249 ec2-user]# yum install -y python26-virtualenv
Loaded plugins: extras_suggestions, langpacks, priorities, update-motd
amzn2-core                                                                                 | 2.4 kB  00:00:00
epel/x86_64/metalink                                                                       |  15 kB  00:00:00
epel                                                                                       | 5.3 kB  00:00:00
epel-debuginfo/x86_64/metalink                                                             |  14 kB  00:00:00
epel-debuginfo                                                                             | 3.0 kB  00:00:00
epel-source/x86_64/metalink                                                                |  14 kB  00:00:00
epel-source                                                                                | 4.1 kB  00:00:00
(1/5): epel/x86_64/updateinfo                                                              | 976 kB  00:00:00
(2/5): epel-debuginfo/x86_64/primary_db                                                    | 899 kB  00:00:00
(3/5): epel/x86_64/primary_db                                                              | 6.7 MB  00:00:00
(4/5): epel-source/x86_64/updateinfo                                                       | 976 kB  00:00:00
(5/5): epel-source/x86_64/primary_db                                                       | 2.4 MB  00:00:00
182 packages excluded due to repository priority protections
No package python26-virtualenv available.
Error: Nothing to do

I have enabled epel repo on the instance using the following command:

sudo yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm

Also the output of yum repolist all on the instance is the following:

[ec2-user@ip-10-186-34-249 ~]$ yum repolist all
Loaded plugins: extras_suggestions, langpacks, priorities, update-motd
228 packages excluded due to repository priority protections
repo id                               repo name                                                status
!amzn2-core/2/x86_64                  Amazon Linux 2 core repository                           enabled: 16,418+183
!amzn2-core-debuginfo/2/x86_64        Amazon Linux 2 core repository - debuginfo packages      enabled:   3,303+16
!amzn2-core-source/2                  Amazon Linux 2 core repository - source packages         enabled:          0
amzn2extra-docker/2/x86_64            Amazon Extras repo for docker                            enabled:         14
!amzn2extra-docker-debuginfo/2/x86_64 Amazon Extras debuginfo repo for docker                  disabled
amzn2extra-docker-source/2            Amazon Extras source repo for docker                     disabled
epel/x86_64                           Extra Packages for Enterprise Linux 7 - x86_64           enabled: 13,023+209
epel-debuginfo/x86_64                 Extra Packages for Enterprise Linux 7 - x86_64 - Debug   enabled:   2,862+47
epel-source/x86_64                    Extra Packages for Enterprise Linux 7 - x86_64 - Source  enabled:          0
epel-testing/x86_64                   Extra Packages for Enterprise Linux 7 - Testing - x86_64 disabled
!epel-testing-debuginfo/x86_64        Extra Packages for Enterprise Linux 7 - Testing - x86_64 disabled
epel-testing-source/x86_64            Extra Packages for Enterprise Linux 7 - Testing - x86_64 disabled
repolist: 35,620

On an Amazon Linux 1 machine where this problem doesn't exist i see other repos present under /etc/yum.repos.d/

[ec2-user@ip-10-150-135-107 ~]$ ls /etc/yum.repos.d/
amzn-main.repo     amzn-preview.repo  epel.repo
amzn-nosrc.repo    amzn-updates.repo  epel-testing.repo

Although i might be wrong but i feel if i can somehow enable amzn-main.repo on my new AL2 instance, i would be able to install python26-virtualenv. Is this possible? If its not, then please suggest a way to install python26-virtualenv on my AL2 instance.

TheShobhit147
  • 125
  • 1
  • 1
  • 7

0 Answers0