Installing PHP8.1 removes necessary i386 dependencies needed for WINE

Hi, few days ago I've installed new zorin os 16 but i can't install php on it like usual it says this:

The following packages have unmet dependencies: php8.1-fpm : Depends: php8.1-cli but it is not going to be installed Depends: libpcre2-8-0 (>= 10.38) but 10.34-7 is to be installed E: Unable to correct problems, you have held broken packages.

This is due to you trying to install php8.1 on the system instead of 7.4.
You could run

sudo apt --fix-broken install

then

sudo apt install -y php-fpm

Hi thanks but it didn't change:

➜  ~ sudo apt --fix-broken install
Reading package lists... Done
Building dependency tree       
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 13 not upgraded.
➜  ~ sudo apt install -y php-fpm
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 php-fpm : Depends: php8.1-fpm but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

Did you add a repository for PHP?
Please post the full output of

sudo apt update

Here:

➜  ~ sudo apt update 
Hit:1 http://ir.archive.ubuntu.com/ubuntu focal InRelease                                       
Hit:2 http://ir.archive.ubuntu.com/ubuntu focal-updates InRelease                                               
Hit:3 http://ir.archive.ubuntu.com/ubuntu focal-backports InRelease                                                                                        
Hit:4 http://ppa.launchpad.net/ondrej/php/ubuntu focal InRelease                                                                                           
Hit:5 http://ppa.launchpad.net/thopiekar/openrgb/ubuntu focal InRelease                                                                                                
Hit:6 http://security.ubuntu.com/ubuntu focal-security InRelease                                                                                                       
Hit:7 http://ppa.launchpad.net/ubuntu-x-swat/updates/ubuntu focal InRelease                                                             
Hit:8 http://ppa.launchpad.net/zorinos/apps/ubuntu focal InRelease                                                
Hit:9 http://ppa.launchpad.net/zorinos/drivers/ubuntu focal InRelease                                             
Hit:10 http://ppa.launchpad.net/zorinos/patches/ubuntu focal InRelease                                            
Hit:11 http://ppa.launchpad.net/zorinos/stable/ubuntu focal InRelease                                             
Hit:12 https://packages.zorinos.com/stable focal InRelease                                                        
Hit:13 https://packages.zorinos.com/patches focal InRelease
Hit:14 https://packages.zorinos.com/apps focal InRelease
Hit:15 https://packages.zorinos.com/drivers focal InRelease
Hit:16 https://packages.zorinos.com/premium focal InRelease
Reading package lists... Done
Building dependency tree       
Reading state information... Done
3 packages can be upgraded. Run 'apt list --upgradable' to see them.
➜  ~ sudo apt upgrade
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
The following packages have been kept back:
  libpcre2-8-0 libxml2 libxml2:i386
0 upgraded, 0 newly installed, 0 to remove and 3 not upgraded.

Also found that libpcre2-8-0 not upgrading idk why!

Can you please switch to the main server?
Launch Software & Updates, then for the drop down menu next to Download From select "Main Server."

What is the output of

sudo apt-mark showhold

Can you run:

sudo dpkg --add-architecture i386

I did that but still the first one goes to ir. ...

➜  ~ sudo apt update
Hit:1 http://ir.archive.ubuntu.com/ubuntu focal-updates InRelease              
Hit:2 http://archive.ubuntu.com/ubuntu focal InRelease                         
Hit:3 http://ir.archive.ubuntu.com/ubuntu focal-backports InRelease            
Hit:4 http://ppa.launchpad.net/ondrej/php/ubuntu focal InRelease               
Get:5 http://security.ubuntu.com/ubuntu focal-security InRelease [114 kB]      
Hit:6 http://ppa.launchpad.net/thopiekar/openrgb/ubuntu focal InRelease        
Hit:7 http://ppa.launchpad.net/ubuntu-x-swat/updates/ubuntu focal InRelease    
Hit:8 http://ppa.launchpad.net/zorinos/apps/ubuntu focal InRelease             
Hit:9 https://packages.zorinos.com/stable focal InRelease                      
Hit:10 http://ppa.launchpad.net/zorinos/drivers/ubuntu focal InRelease         
Hit:11 https://packages.zorinos.com/patches focal InRelease                    
Hit:12 http://ppa.launchpad.net/zorinos/patches/ubuntu focal InRelease         
Hit:13 https://packages.zorinos.com/apps focal InRelease                       
Hit:14 http://ppa.launchpad.net/zorinos/stable/ubuntu focal InRelease          
Hit:15 https://packages.zorinos.com/drivers focal InRelease
Hit:16 https://packages.zorinos.com/premium focal InRelease
Fetched 114 kB in 3s (34.9 kB/s)
Reading package lists... Done
Building dependency tree       
Reading state information... Done
3 packages can be upgraded. Run 'apt list --upgradable' to see them.

It has no output!

my cpu architecture is amd64 i guess however i run that and done apt update && apt upgrade && apt install php-fpm; but nothing changes!

This is strange... on mine, I get:

sudo apt install -y php-fpm                                               ─╯
[sudo] password for mech-one:     
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following additional packages will be installed:
  php-common php7.4-cli php7.4-common php7.4-fpm php7.4-json php7.4-opcache
  php7.4-readline
Suggested packages:
  php-pear
The following NEW packages will be installed:
  php-common php-fpm php7.4-cli php7.4-common php7.4-fpm php7.4-json
  php7.4-opcache php7.4-readline
0 upgraded, 8 newly installed, 0 to remove and 0 not upgraded.

And it installed. (Now, I need to remove it... :stuck_out_tongue: )

In terminal, run

sudo -i

Now, launch the elevated File Manager:

nautilus

Click on Other Locations in the left pane. Then, "Computer".
Now, navigate to /etc/apt
Right click on sources.list and select to Open With Text Editor
Scroll down to //ir.archive.ubuntu.com/ubuntu focal-updates and remove the ir
to make it look exactly like //archive.ubuntu.com/ubuntu
Repeat this for //ir.archive.ubuntu.com/ubuntu focal-backports

Once done, save the file and close it.
You can exit the sudo -i in terminal

exit

Now, run

sudo apt update && sudo apt upgrade

You need to preform the upgrade so the system is up to date... I'm thinking the dependency may require a certain version of library so that it will install. I know Aravisian's machine is up to date, which leads me to believe that a library needs updated for the dependency of php.

I just solved it with the help of this answer on askubuntu:

I had to install it manually! (still not sure what problem this could bring up later)
apt install libpcre2-8-0

Thanks Aravisian for the assist.

But how can i undo this?

You can undo that with:

sudo apt remove --purge ".*:i386"

sudo dpkg --remove-architecture i386

I do not recommend doing so, however. It is not dangerous, either way. But should you need the architecture later, they are already in place.

If you are performing development there will be several languages that require the 32 bit libraries. You may as well leave it installed.

27 posts were split to a new topic: Installing Zorin Windows App Support - missing dependencies

I reinstalled the os, and guess what:

can't install the php again :sleeping:

I don't know actually how these work but I guess there is a package in this picture that would cause some conflict with zorin-windows-app-support

The most related issue from PHP is here on oerdnj repository

Yes - You guess correctly.
In order to install - and to use installed wine - those 32 bit packages are necessary.
Which explains all the wine32 trouble you were having - and that it showed wine64 as installed.
This: apt install libpcre2-8-0 is breaking it.

What happens if you instead run:

sudo apt install libpcre2-8-0:i386 && sudo apt install -y php-fpm

I just tested this daringly on my own machine:



image

Why is it working on mine and not yours...

I just saw why:
Yours is looking for 8.1 again. Did you add a repository for php?

just weird, since i just installed the os right now.

yes I did,
ppa:ondrej/php