Назад | Перейти на главную страницу

Amazon Linux: yum install php73> «Нет пакета php73»

На сервере Amazon EC2 Linux я запустил:

sudo su -
yum -y update
yum install -y php73

Я получаю ошибку No package php73 available.

Я смог установить httpd, php, & php-mysql Ладно.

Вот мой список репо yum:

[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

Я создал /etc/yum.repos.d/amzn2-updates.repo, но когда я бегу yum install php73, Я получаю сообщение об ошибке:

Загруженные плагины: extras_suggestions, langpacks, priority, update-motd Не удалось получить список зеркал http://repo.ap-southeast-2.amazonaws.com/2/updates/mirror.list ошибка была 14: ошибка HTTP 403 - запрещено

Один из настроенных репозиториев вышел из строя (неизвестно), и yum не имеет достаточно кэшированных данных для продолжения. На этом этапе единственная безопасная вещь, которую может сделать yum - потерпеть неудачу. Есть несколько способов "исправить" это:

 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

Не удается найти действительный базовый URL-адрес для репо: amzn-updates / 2

Это мое /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

Помощь приветствуется.

Когда я запускаю установку на Amazon Linux v1, я вижу вот что

sudo yum install php73
Loaded plugins: update-motd, upgrade-helper
Resolving Dependencies
--> Running transaction check
---> Package php73.x86_64 0:7.3.14-1.23.amzn1 will be installed
--> Processing Dependency: php73-common(x86-64) = 7.3.14-1.23.amzn1 for package: php73-7.3.14-1.23.amzn1.x86_64
--> Processing Dependency: php73-cli(x86-64) = 7.3.14-1.23.amzn1 for package: php73-7.3.14-1.23.amzn1.x86_64
--> Processing Dependency: php73-common for package: php73-7.3.14-1.23.amzn1.x86_64
--> Running transaction check
---> Package php73-cli.x86_64 0:7.3.14-1.23.amzn1 will be installed
---> Package php73-common.x86_64 0:7.3.14-1.23.amzn1 will be installed
--> Processing Dependency: php73-xml(x86-64) = 7.3.14-1.23.amzn1 for package: php73-common-7.3.14-1.23.amzn1.x86_64
--> Processing Dependency: php73-process(x86-64) = 7.3.14-1.23.amzn1 for package: php73-common-7.3.14-1.23.amzn1.x86_64
--> Processing Dependency: php73-json(x86-64) for package: php73-common-7.3.14-1.23.amzn1.x86_64
--> Running transaction check
---> Package php73-json.x86_64 0:7.3.14-1.23.amzn1 will be installed
---> Package php73-process.x86_64 0:7.3.14-1.23.amzn1 will be installed
---> Package php73-xml.x86_64 0:7.3.14-1.23.amzn1 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

=============================================================================================================
 Package                   Arch               Version                         Repository                Size
=============================================================================================================
Installing:
 php73                     x86_64             7.3.14-1.23.amzn1               amzn-updates             3.6 M
Installing for dependencies:
 php73-cli                 x86_64             7.3.14-1.23.amzn1               amzn-updates             5.1 M
 php73-common              x86_64             7.3.14-1.23.amzn1               amzn-updates             1.4 M
 php73-json                x86_64             7.3.14-1.23.amzn1               amzn-updates              82 k
 php73-process             x86_64             7.3.14-1.23.amzn1               amzn-updates              95 k
 php73-xml                 x86_64             7.3.14-1.23.amzn1               amzn-updates             322 k

Transaction Summary
=============================================================================================================
Install  1 Package (+5 Dependent packages)

Total download size: 11 M
Installed size: 36 M
Is this ok [y/d/N]: n
Exiting on user command
Your transaction was saved, rerun it with:
 yum load-transaction /tmp/yum_save_tx.2020-02-28.20-47.yUTifC.yumtx

Вот репо yum, которое у меня есть

> yum repolist all
Loaded plugins: update-motd, upgrade-helper
repo id                                 repo name                                            status
amzn-main/latest                        amzn-main-Base                                       enabled: 5,933+1
amzn-main-debuginfo/latest              amzn-main-debuginfo                                  disabled
amzn-main-source/latest                 amzn-main-source                                     disabled
!amzn-nosrc/latest                      amzn-nosrc-Base                                      disabled
!amzn-preview/latest                    amzn-preview-Base                                    disabled
amzn-preview-debuginfo/latest           amzn-preview-debuginfo                               disabled
amzn-preview-source/latest              amzn-preview-source                                  disabled
amzn-updates/latest                     amzn-updates-Base                                    enabled: 3,774+2
amzn-updates-debuginfo/latest           amzn-updates-debuginfo                               disabled
amzn-updates-source/latest              amzn-updates-source                                  disabled
!copart-restic/x86_64                   Copr repo for restic owned by copart                 disabled
!devopsx-amazon/x86_64                  DevopsX packages for Amazon Linux - x86_64           disabled
!download.mono-project.com_repo_centos_ added from: http://download.mono-project.com/repo/ce disabled
!epel/x86_64                            Extra Packages for Enterprise Linux 6 - x86_64       disabled
epel-debuginfo/x86_64                   Extra Packages for Enterprise Linux 6 - x86_64 - Deb enabled:   2,958
epel-source/x86_64                      Extra Packages for Enterprise Linux 6 - x86_64 - Sou enabled:       0
epel-testing/x86_64                     Extra Packages for Enterprise Linux 6 - Testing - x8 disabled
epel-testing-debuginfo/x86_64           Extra Packages for Enterprise Linux 6 - Testing - x8 disabled
epel-testing-source/x86_64              Extra Packages for Enterprise Linux 6 - Testing - x8 disabled
repolist: 12,665

Интересно, включено ли у вас правильное репо. Если это не помогает, отредактируйте свой вопрос, чтобы отобразить список репо с «yum repolist all».

Если вам нужен репозиторий Amazon Updates, попробуйте добавить его в файл /etc/yum.repos.d/amzn-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