Error installing php8.1

Hello good day, I am trying to install php 8.1 in manjaro.

I’m using

[home_the_archphp_Arch]
Server = https://download.opensuse.org/repositories/home:/el:/archphp/Arch/$arch
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}"

But when installing it I get the following error:

sudo pacman -S php81-cli  1 ✘  4s 
[sudo] password for santy:
resolving dependencies...
looking for conflicts between packages...

Packages (2) php81-8.1.21-1 php81-cli-8.1.21-1

Total download size: 2.84 MiB
Total installation size: 13.55 MiB

:: Continue with the installation? [Y/n] yes
:: Getting the packages...
  could not download php81-cli-8.1.21-1-x86_64.pkg.tar.zst
  Total (1/2) 2.8 MiB 937 KiB/s 00:03 [################################# ####] 100%
error: Could not get file "php81-cli-8.1.21-1-x86_64.pkg.tar.zst" from download.opensuse.org: Maximum file size exceeded
warning: could not receive some files
error: operation failed (download library error)
Errors occurred, so the packages will not be updated

Can someone help me install it?

From already thank you very much.


Moderator edit: In the future, please use proper formatting: [HowTo] Post command output and file content as formatted text

Welcome to the forum! :vulcan_salute:

Why are you not using the php package from the Manjaro repository? It’s already at version 8.2.

Hi thanks.

Not for compatibility reasons I need to install php8.1

Well, in that case, I would advise you to download the package php81-cli-8.1.21-1-x86_64.pkg.tar.zst from download.opensuse.org directly with a browser of your choice, save it in your ~/Downloads folder, and then install it manually, like so… :arrow_down:

cd ~/Downloads
sudo pacman -U php81-cli-8.1.21-1-x86_64.pkg.tar.zst

Ok, could you help me, I’m new to this part… I come from ubuntu which is a bit different.

In which folder do I look for the “php81-cli-8.1.21-1-x86_64.pkg.tar.zst”?

Well, okay, upon closer inspection, we’re off on the wrong foot. You are trying to access the AUR by way of pacman, but pacman does not have access to the AUR. For that you need pamac instead.

As a regular user — without sudo! — run the following command… :arrow_down:

pamac build php81-cli

That should take care of everything.

pamac build php81-cli  1 ✘  19s 
install php81-cli from home_el_archphp_arch ? [y/N] and
Preparing...
==== AUTHENTICATING FOR org.manjaro.pamac.commit ====
Authentication is required to install, update or remove packages
Authenticating as: Santiago Martinez (santy)
Password:
==== AUTHENTICATION COMPLETE ====
Synchronizing package databases...
Resolving dependencies...
Checking for inter-conflicts...

To install (2):
   php81 8.1.21-1 (Required by: php81-cli) home_el_archphp_Arch 863.6 KB
   php81-cli 8.1.21-1 home_el_archphp_Arch 2.1 MB

Total download size : 3.0 MB
Total installed size: 14.2 MB

Apply transaction ? [y/N] and
Download of php81-cli (8.1.21-1) has started
php81 (8.1.21-1) download has started
php81 (8.1.21-1) download finished
php81-cli (8.1.21-1) download finished
Checking key fob... [2/2]
Checking integrity... [2/2]
Error: php81: Invalid signature of "home:el OBS Project <home:el@build.opensuse.org>"
Error: php81-cli: Invalid signature of "home:el OBS Project <home:el@build.opensuse.org>"
Removing invalid files and trying again...
Resolving dependencies...
Checking for inter-conflicts...
php81 (8.1.21-1) download has started
Download of php81-cli (8.1.21-1) has started
php81 (8.1.21-1) download finished
php81-cli (8.1.21-1) download finished
Checking key fob... [2/2]
Checking integrity... [2/2]
Error: php81: Invalid signature of "home:el OBS Project <home:el@build.opensuse.org>"
Error: php81-cli: Invalid signature of "home:el OBS Project <home:el@build.opensuse.org>"
Error: Failed to complete transaction: invalid or corrupt package (PGP signature):

It still doesn’t work.


Moderator edit: In the future, please use proper formatting: [HowTo] Post command output and file content as formatted text

Okay, so the uploader’s signature has expired. That brings us back to the earlier part. Download this package and its matching signature file. Save them both in ~/Downloads and then… :arrow_down:

cd ~/Downloads
sudo pacman -U php81-cli-8.1.21-1-x86_64.pkg.tar.zst

This is a slightly older version of the package, so maybe this will work. :crossed_fingers:

Ok how do i apply the [signature file]?

given that
sudo pacman -U php81-cli-8.1.21-1-x86_64.pkg.tar.zst  1 ✘
loading packages…
error: ‘php81-cli-8.1.21-1-x86_64.pkg.tar.zst’: invalid or corrupt package (PGP signature)

For what do you need this outdated version?

I would recommend wrapping your this service in a docker container.

1 Like

I don’t want to spoil the fun, but if you have at any point in time at least partially succeeded to do what you tried in the first post - you now have or will soon have an utterly broken system. You tried to force pamac to work with mirror for another OS…and the keys for that mirror. How do you think it will work out when anything from the rest of the system tries to update.

And i would personally never use Arch based distro (rolling release) for a web server…

1 Like

:bangbang: Tip: :bangbang:

To provide terminal output, copy the text you wish to share, and paste it here, surrounded by three (3) backticks, a.k.a grave accents. Like this:

```
pasted text
```

Or three (3) tilde signs, like this:

~~~
pasted text
~~~

This will just cause it to be rendered like this:

Portaest sed
elementum
cursus nisl nisi
hendrerit ac quis
sit
adipiscing
tortor sit leo commodo.

Instead of like this:

Portaest sed elementum cursus nisl nisi hendrerit ac quis sit adipiscing tortor sit leo commodo.

Alternatively, paste the text you wish to format as terminal output, select all pasted text, and click the </> button on the taskbar. This will indent the whole pasted section with one TAB, causing it to render the same way as descrribed above.

Thereby improving legibility and making it much easier for those trying to be of assistance.

Please edit your post accordingly.

For more information, please see:


:bangbang::bangbang: Additionally

If your language isn’t English, please prepend any and all terminal commands with LC_ALL=C. For example:

LC_ALL=C bluetoothctl

This will just cause the terminal output to be in English, making it easier to understand and debug.

3 Likes

Or any server, for that matter. My server is Ubuntu 22.04.2 LTS with PHP 8.1 (upgrading it one of these days) and it works splendidly!

Hi, I’m not using an arch version for web servers, I switched from xubuntu to manjaro, which I liked, and I’m a web and app developer, and I have a laravel system that uses php8.1 and updating it would take me a long time. That’s why to be able to use composer and not throw errors I want to install that version. Thank you

Thanks, I’m new here and I couldn’t find that part!

For the initial question you received your answer (use containers), but i would advise you to try to install or update any program whatsoever and if it fails to start repairing the system (keyring, pacman.conf, mirrors). Or if it a brand new install - just reinstall.

1 Like

Just so we’re clear: Manjaro is a fork of Arch, and like Arch, of course, it is rolling-release. So it’s Arch-based.

I’d suggest either getting, using an updated system, or look into running a php8.1 docker container

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.