On an Amazon EC2 Linux server, I've run:
sudo su -
yum -y update
yum install -y php73
I receive the error No package php73 available
.
I've been able to install httpd
, php
, & php-mysql
okay.
Here is my yum repo list:
[root@ip-172-31-1-175 httpd]# yum repolist all
Loaded plugins: extras_suggestions, langpacks, priorities, update-motd
amzn2-core | 2.4 kB 00:00:00
amzn2extra-docker | 1.3 kB 00:00:00
amzn2extra-php7.3 | 1.8 kB 00:00:00
(1/2): amzn2extra-php7.3/2/x86_64/updateinfo | 69 B 00:00:00
(2/2): amzn2extra-php7.3/2/x86_64/primary_db | 256 kB 00:00:00
repo id repo name status
amzn2-core/2/x86_64 Amazon Linux 2 core repository enabled: 18,631
amzn2-core-debuginfo/2/x86_64 Amazon Linux 2 core repository - debug disabled
amzn2-core-source/2 Amazon Linux 2 core repository - sourc disabled
amzn2extra-docker/2/x86_64 Amazon Extras repo for docker enabled: 19
amzn2extra-docker-debuginfo/2/x86_64 Amazon Extras debuginfo repo for docke disabled
amzn2extra-docker-source/2 Amazon Extras source repo for docker disabled
amzn2extra-php7.3/2/x86_64 Amazon Extras repo for php7.3 enabled: 305
amzn2extra-php7.3-debuginfo/2/x86_64 Amazon Extras debuginfo repo for php7. disabled
amzn2extra-php7.3-source/2 Amazon Extras source repo for php7.3 disabled
repolist: 18,955
I've created /etc/yum.repos.d/amzn2-updates.repo
, but when I run yum install php73
, I receive the error:
Loaded plugins: extras_suggestions, langpacks, priorities, update-motd Could not retrieve mirrorlist http://repo.ap-southeast-2.amazonaws.com/2/updates/mirror.list error was 14: HTTP Error 403 - Forbidden
One of the configured repositories failed (Unknown), and yum doesn't have enough cached data to continue. At this point the only safe thing yum can do is fail. There are a few ways to work "fix" this:
1. Contact the upstream for the repository and get them to fix the problem. 2. Reconfigure the baseurl/etc. for the repository, to point to a working upstream. This is most often useful if you are using a newer distribution release than is supported by the repository (and the packages for the previous distribution release still work). 3. Run the command with the repository temporarily disabled yum --disablerepo=<repoid> ... 4. Disable the repository permanently, so yum won't use it by default. Yum will then just ignore the repository until you permanently enable it again or use --enablerepo for temporary usage: yum-config-manager --disable <repoid> or subscription-manager repos --disable=<repoid> 5. Configure the failing repository to be skipped, if it is unavailable. Note that yum will try to contact the repo. when it runs most commands, so will have to try and fail each time (and thus. yum will be be much slower). If it is a very temporary problem though, this is often a nice compromise: yum-config-manager --save --setopt=<repoid>.skip_if_unavailable=true
Cannot find a valid baseurl for repo: amzn-updates/2
This is my /etc/yum.repos.d/amzn2-updates.repo
:
[amzn-updates]
name=amzn-updates-Base
mirrorlist=http://repo.$awsregion.$awsdomain/$releasever/updates/mirror.list
mirrorlist_expire=300
metadata_expire=300
priority=10
failovermethod=priority
fastestmirror_enabled=0
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-amazon-ga
enabled=1
retries=3
timeout=5
report_instanceid=yes
[amzn-updates-debuginfo]
name=amzn-updates-debuginfo
mirrorlist=http://repo.$awsregion.$awsdomain/$releasever/updates/debuginfo/mirror.list
mirrorlist_expire=300
metadata_expire=300
priority=10
failovermethod=priority
fastestmirror_enabled=0
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-amazon-ga
enabled=0
retries=3
timeout=5
report_instanceid=yes
[amzn-updates-source]
name=amzn-updates-source
mirrorlist=http://repo.$awsregion.$awsdomain/$releasever/updates/SRPMS/mirror.list
mirrorlist_expire=300
metadata_expire=300
priority=10
failovermethod=priority
fastestmirror_enabled=0
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-amazon-ga
enabled=0
retries=3
timeout=5
report_instanceid=yes
Help appreciated.
When I run the install on Amazon Linux v1 here's what I see
Here's the yum repo's I have available
I wonder if you have the correct repo enabled. If this doesn't help please edit your question to show your repo list with "yum repolist all".
If you need the Amazon Updates repo, try adding this to the file /etc/yum.repos.d/amzn-updates.repo