Archlinux: Custom PHP Builds

Read comments at bottom of page to see how to use this repository

Name Changed
Comments 9

Eugene Lamskoy's avatar

el wrote

Archlinux PHP binary packages repository

Supported at same time PHP versions: 5.3, 5.4, 5.5, 5.6, 7.0, 7.1, 7.2, 7.3, 7.4, 8.0, 8.1

Import PGP key first:

key=$(curl -fsSL https://download.opensuse.org/repositories/home:el:archphp/Arch/$(uname -m)/home_el_archphp_Arch.key)
fingerprint=$(gpg --quiet --with-colons --import-options show-only --import --fingerprint <<< "${key}" | awk -F: '$1 == "fpr" { print $10 }')
pacman-key --init
pacman-key --add - <<< "${key}"
pacman-key --lsign-key "${fingerprint}"

Append to /etc/pacman.conf:

[home_el_archphp_Arch]
Server = https://download.opensuse.org/repositories/home:/el:/archphp/Arch/$arch

Refresh packages database:

pacman -Sy

Now search for php packages you need (PHP 8.1):

pacman -Ss php81

Or PHP 7.0 for example:

pacman -Ss php70

Install them using pacman -S

More examples

Install all PHP 8.1 packages:

sudo pacman -S $(pacman -Ssq | grep '^php81')

Install all PHP 7.4 packages:

sudo pacman -S $(pacman -Ssq | grep '^php74')

Works for all php53, php54, php55 ... etc up to php81 packages

  • Console version /usr/bin/phpXX is installed with phpXX-cli subpackage
  • PEAR and PECL are available as phpXX-pear and phpXX-pecl subpackages
  • All shared modules are respresented as stand-alone subpackages
  • Separate INI files for each extension are placed in /etc/phpXX/conf.d
  • Extensions are loaded in correct order according to priority

Damian Galli's avatar

dgalli1 wrote

The PHP80 packages seem to give me issues. :: installing php80 (8.0.16-1) breaks dependency 'php80=8.0.15' required by php80-fpm :: installing php80 (8.0.16-1) breaks dependency 'php80=8.0.15' required by php80-imap :: installing php80 (8.0.16-1) breaks dependency 'php80=8.0.15' required by php80-mysql :: installing php80-pdo (8.0.16-1) breaks dependency 'php80-pdo=8.0.15' required by php80-mysql :: installing php80-openssl (8.0.16-1) breaks dependency 'php80-openssl=8.0.15' required by php80-mysql :: installing php80 (8.0.16-1) breaks dependency 'php80=8.0.15' required by php80-sqlite :: installing php80-pdo (8.0.16-1) breaks dependency 'php80-pdo=8.0.15' required by php80-sqlite :: installing php80 (8.0.16-1) breaks dependency 'php80=8.0.15' required by php80-tokenizer :: installing php80-xml (8.0.16-1) breaks dependency 'php80-xml=8.0.15' required by php80-xmlreader :: installing php80-xml (8.0.16-1) breaks dependency 'php80-xml=8.0.15' required by php80-xmlwriter :: installing php80 (8.0.16-1) breaks dependency 'php80=8.0.15' required by php80-zip


Eugene Lamskoy's avatar

el wrote

Sorry for late reply. War in my country. Try to remove php80* packages first and then reinstall from repo


Ivar Alink's avatar

ivaralink wrote

When Downloading php74 i get: error: failed retrieving file 'php74-mysql-7.4.27-7-x86_64.pkg.tar.zst' from download.opensuse.org : Maximum file size exceeded

How come?


Eugene Lamskoy's avatar

el wrote

Better to ask upstream obs itself - I can't control file size limits in any project settings


Kiril Vodenicharov's avatar

CellFishy wrote

Experiencing the same issue as @ivaralink when trying to install php71

error: failed retrieving file 'php71-7.1.33-7-x86_64.pkg.tar.zst' from download.opensuse.org : Maximum file size exceeded


Iuri Gustavo's avatar

iurigustavo wrote

Please setup wget as default download tool by removing comment from line XferCommand = /usr/bin/wget --passive-ftp -c -O%o %u in /etc/pacman.conf, then try again.


Eugene Lamskoy's avatar

el wrote

wow, nice solution


Meight Blake's avatar

m8mbkk wrote

I am experiencing an invalid signature when running pacman -Sy . And I have just imported the PGP key, did the signature change?

error: home_el_archphp_Arch: signature from "home:el OBS Project <home:el@build.opensuse.org>" is invalid

openSUSE Build Service is sponsored by