Archlinux: Custom PHP Builds

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

Name Labels Changed
Comments 15

Eugene Lamskoy's avatar

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

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

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


Ivar Alink's avatar

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

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


Kiril Vodenicharov's avatar

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

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

wow, nice solution


Meight Blake's avatar

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


Vincent GS's avatar

What I finally did, because no one answered me in forums, neither here, was:

Update: just adding SigLevel = Never

above the Server setting:

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

Octavius Farrel's avatar

Will you add support for --enable-zts build configure option ?


Eugene Lamskoy's avatar

Not planned in near future


Gayot's avatar

I got the same invalid signature error. Any workaround to import key without error ?


Eugene Lamskoy's avatar

Probable I'll move away from build.opensuse.org. Too much errors with signature and HTTP timeouts etc. Dunno. I can't control obs signature in any way


Markus Velt's avatar

Hi el,

same problem today, again.

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

Will there be a solution to this problem in the near future? I like the project very much and would be reluctant to look for an alternative.

openSUSE Build Service is sponsored by