PHP Repository Installation

1

Hi, I’m using Amazon Linux 2023 with LEMP installed for WordPress. and I’ve using NginX’s and MariaDB’s official repositories. Since there’s no official php repo, so I used the Amazon Linux 2023 repository, but its php package doesn’t have the php module imagick recommended by WP.

It’s been stated Amazon Linux 2023 doesn’t support EPEL, so is there any way to install imagick?

Thanks!

질문됨 10달 전939회 조회
1개 답변
0
수락된 답변

As you are aware, php-pecl-imagick has been removed in Amazon Linux 2023.
Also, the EPEL repository cannot be used.
https://docs.aws.amazon.com/ja_jp/linux/al2022/release-notes/removed-packages.html

So follow the steps below to add the Fedora 36 repository.

sudo vi /etc/yum.repos.d/fedora.repo

[fedora]
name=Fedora 36 - $basearch
#baseurl=http://download.example/pub/fedora/linux/releases/36/Everything/$basearch/os/
metalink=https://mirrors.fedoraproject.org/metalink?repo=fedora-36&arch=$basearch
enabled=0
countme=1
metadata_expire=7d
repo_gpgcheck=0
type=rpm
gpgcheck=1
gpgkey=https://getfedora.org/static/fedora.gpg
skip_if_unavailable=False

After adding the repository, you can install it with the following command.

sudo dnf --enablerepo=fedora install php-pecl-imagick -y
profile picture
전문가
답변함 10달 전
profile pictureAWS
전문가
검토됨 10달 전
  • How to add Fedora 38 repo? Because Fedora 36 is deprecated and no longer maintained or updated.

  • I just tried the following settings and was able to install even on Fedora 38.

    [fedora]
    name=Fedora 38 - $basearch
    #baseurl=http://download.example/pub/fedora/linux/releases/36/Everything/$basearch/os/
    metalink=https://mirrors.fedoraproject.org/metalink?repo=fedora-38&arch=$basearch
    enabled=0
    countme=1
    metadata_expire=7d
    repo_gpgcheck=0
    type=rpm
    gpgcheck=1
    gpgkey=https://getfedora.org/static/fedora.gpg
    skip_if_unavailable=False
    
    sudo dnf --enablerepo=fedora install php-pecl-imagick -y
    sudo dnf --enablerepo=fedora info php-pecl-imagick
    Last metadata expiration check: 0:02:22 ago on Thu Jul 20 02:44:29 2023.
    Installed Packages
    Name         : php-pecl-imagick
    Version      : 3.7.0
    Release      : 6.fc38
    Architecture : x86_64
    Size         : 1.1 M
    Source       : php-pecl-imagick-3.7.0-6.fc38.src.rpm
    Repository   : @System
    From repo    : fedora
    Summary      : Provides a wrapper to the ImageMagick library
    URL          : https://pecl.php.net/package/imagick
    License      : PHP
    Description  : Imagick is a native php extension to create and modify images using the
                 : ImageMagick API.
    

    Just to share for the record, Amazon Linux 2023 is created on a Fedora 34-36 base. In other words, please note that in some cases it may occur that the intended behavior may not be achieved. https://docs.aws.amazon.com/ja_jp/linux/al2023/ug/relationship-to-fedora.html

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠