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.
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:
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
That's what is breaking that.
Please remove that repo, then run the command from above.
Ensure in so doing that nothing will be removed as you did before. Check the Autoremove list it provides before clicking y again...
it would not find it, since I guess the php8.1 is only available on this repo
but I'll try that:
Be sure to run sudo apt update
after removing the repo...
Ok... You have installed PHP, though...
Is there a Specific Reason you need 8.1?
well, since the projects I had created and their dependencies are all in PHP 8.1, I would rather switch off the zorin-windows-app-support.
If there is no other solution...
Isn't there any option like the above answer in which I install a specific version alongside the older version since these are some libraries?
This is trickier to answer.
A quick Crash Course in Debian Packages, Repositories and Human Nature:
I have a repo of my own. I create debian (.deb) packages for this repository that users can add my repo, then install what I upload.
So, I speak from experience.
To create a debian package, one of the files I must include is a build-depends
file. This file sets what dependencies are needed and it is how APT knows what dependencies may be missing or what to install with the -y
parameter.
Needless to say, this is a very important file.
The proper way to build this file list is to look-into and ensure that you list only the minimum necessary dependency required. Checking on this is a bit of work... So what some maintainers do to save time is just grab a Ready List of the Current Package Versions and paste that into it. (To give some perspective, my usual build-depends file contains about 250 dependency packages listed). And... you can see the flaw in this... Instead of listing only the necessary dependencies, it now limits what that package can be installed on. It also can create conflicts when a maintainer lists a current package version - without checking - instead of the package version actually in the Main Universe Repo it is to build to.
This is what the 8.1 maintainer has done. He included dependencies for package versions higher than Focal Fossa.
Your option is to contact the dev/mainainer with a bug report and submit this information. IF php8.1 can use the proper dependency in Focal... he may correct the build-depends file.
Or... Human Nature... he may wish to not spend time researching that and instead, correct the repo to work on Impish only.
Taking that chance is up to you, as it is up to the maintainer to sort that out, sadly.