Open4

php7.2からphp8.1へアップデート

dehio3dehio3

Error: Package: ImageMagick6-libs-6.9.12.50-1.el7.remi.x86_64 (remi-safe)

#7 58.75 Error: Package: ImageMagick6-libs-6.9.12.50-1.el7.remi.x86_64 (remi-safe)
#7 58.75            Requires: libraw_r.so.19()(64bit)
#7 58.75  You could try using --skip-broken to work around the problem
#7 58.88  You could try running: rpm -Va --nofiles --nodigest

php81-php-pecl-imagickのインストールにて失敗している
https://qiita.com/t-kigi/items/f6850abaaee1db2df5a4

https://centos.pkgs.org/7/centos-x86_64/LibRaw-0.19.4-1.el7.x86_64.rpm.html

https://www.centos.org/keys/

rpm --import https://www.centos.org/keys/RPM-GPG-KEY-CentOS-7
dehio3dehio3

php5が入っちゃう問題

### デフォルト
bash-4.2# ls /etc/yum.repos.d/                
amzn2-core.repo
### amazon-linux-extras install -y epel
bash-4.2# ls -l /etc/yum.repos.d/
total 16
-rw-r--r-- 1 root root 1003 Oct 26  2021 amzn2-core.repo
-rw-r--r-- 1 root root 1087 May 27 00:08 amzn2-extras.repo
-rw-r--r-- 1 root root 1050 Aug 29  2018 epel-testing.repo
-rw-r--r-- 1 root root  951 Aug 29  2018 epel.repo
### yum -y install http://rpms.remirepo.net/enterprise/remi-release-7.rpm
bash-4.2# ls -l /etc/yum.repos.d/
total 76
-rw-r--r-- 1 root root 1003 Oct 26  2021 amzn2-core.repo
-rw-r--r-- 1 root root 1087 May 27 00:08 amzn2-extras.repo
-rw-r--r-- 1 root root 1050 Aug 29  2018 epel-testing.repo
-rw-r--r-- 1 root root  951 Aug 29  2018 epel.repo
-rw-r--r-- 1 root root  446 Feb 15 10:37 remi-glpi91.repo
-rw-r--r-- 1 root root  446 Feb 15 10:37 remi-glpi92.repo
-rw-r--r-- 1 root root  446 Feb 15 10:37 remi-glpi93.repo
-rw-r--r-- 1 root root  446 Feb 15 10:37 remi-glpi94.repo
-rw-r--r-- 1 root root  855 Feb 15 10:37 remi-modular.repo
-rw-r--r-- 1 root root  456 Feb 15 10:37 remi-php54.repo
-rw-r--r-- 1 root root 1314 Feb 15 10:37 remi-php70.repo
-rw-r--r-- 1 root root 1314 Feb 15 10:37 remi-php71.repo
-rw-r--r-- 1 root root 1314 Feb 15 10:37 remi-php72.repo
-rw-r--r-- 1 root root 1314 Feb 15 10:37 remi-php73.repo
-rw-r--r-- 1 root root 1314 Feb 15 10:37 remi-php74.repo
-rw-r--r-- 1 root root 1314 Feb 15 10:37 remi-php80.repo
-rw-r--r-- 1 root root 1314 Feb 15 10:37 remi-php81.repo
-rw-r--r-- 1 root root  750 Feb 15 10:37 remi-safe.repo
-rw-r--r-- 1 root root 2605 Feb 15 10:37 remi.repo
bash-4.2# yum repolist
Loaded plugins: ovl, priorities
epel/x86_64/metalink                                                                                                                           | 9.1 kB  00:00:00     
epel                                                                                                                                           | 4.7 kB  00:00:00     
remi-safe                                                                                                                                      | 3.0 kB  00:00:00     
(1/4): epel/x86_64/group_gz                                                                                                                    |  96 kB  00:00:00     
(2/4): epel/x86_64/primary_db                                                                                                                  | 7.0 MB  00:00:00     
(3/4): epel/x86_64/updateinfo                                                                                                                  | 1.0 MB  00:00:00     
(4/4): remi-safe/primary_db                                                                                                                    | 2.2 MB  00:00:04     
214 packages excluded due to repository priority protections
repo id                                                      repo name                                                                                       status
amzn2-core/2/x86_64                                          Amazon Linux 2 core repository                                                                      27911
amzn2extra-epel/2/x86_64                                     Amazon Extras repo for epel                                                                             1
epel/x86_64                                                  Extra Packages for Enterprise Linux 7 - x86_64                                                  13543+208
remi-safe                                                    Safe Remi's RPM repository for Enterprise Linux 7 - x86_64                                         4798+6
repolist: 46253

https://blog.denet.co.jp/amazon-linux2-php80/

dehio3dehio3

php81ではなくphpでインストールする

https://blog.at-human.com/2021/02/epel-remi/
https://rpms.remirepo.net/wizard/

amazonlinuxだとamzn2-coreを無効化しない限りphp5が入ってしまう。

https://dev.classmethod.jp/articles/amazonlinux-yum-priority/

デフォルトでpriorityがインストールされている

bash-4.2# rpm -q yum-plugin-priorities
yum-plugin-priorities-1.1.31-46.amzn2.0.1.noarch
bash-4.2# grep priority /etc/yum.repos.d/*
/etc/yum.repos.d/amzn2-core.repo:priority=10
/etc/yum.repos.d/amzn2-core.repo:priority=10
/etc/yum.repos.d/amzn2-core.repo:priority=10
/etc/yum.repos.d/amzn2-extras.repo:priority = 10
/etc/yum.repos.d/amzn2-extras.repo:priority = 10
/etc/yum.repos.d/amzn2-extras.repo:priority = 10
/etc/yum.repos.d/epel-testing.repo:failovermethod=priority
/etc/yum.repos.d/epel-testing.repo:failovermethod=priority
/etc/yum.repos.d/epel-testing.repo:failovermethod=priority
/etc/yum.repos.d/epel.repo:failovermethod=priority
/etc/yum.repos.d/epel.repo:failovermethod=priority
/etc/yum.repos.d/epel.repo:failovermethod=priority