Answer the question
In order to leave comments, you need to log in
How to put PHP under a different architecture on Debian?
I want something strange:
Host machine with x86_64 architecture
Guest machine (LXC) is also x86_64. (Create with command:
sudo lxc-create -n php -t download -- --dist=debian --release=buster --arch=amd64
, so you can repeat exactly my situation). [email protected]:/# arch
x86_64
[email protected]:/# dpkg --add-architecture i386
[email protected]:/# dpkg --print-foreign-architectures
i386
[email protected]:/# cat /etc/apt/sources.list
# Generated by distrobuilder
deb [arch=amd64,i386] http://deb.debian.org/debian buster main
deb [arch=amd64,i386] http://security.debian.org/debian-security buster/updates main
# apt clean
# apt update
# apt install links:i386
##### Пробуем тупо сходу
roo[email protected]:/# apt install php-cli:i386
Reading package lists... Done
Building dependency tree
Reading state information... Done
Note, selecting 'php7.3-cli:i386' instead of 'php-cli:i386'
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:
php7.3-cli:i386 : Depends: php7.3-common:i386 (= 7.3.14-1~deb10u1) but it is not going to be installed
Depends: php7.3-json:i386 but it is not going to be installed
Depends: php7.3-opcache:i386 but it is not going to be installed
Depends: php7.3-readline:i386 but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
##### пробуем вручную
[email protected]:/# apt install php7.3-common:i386
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:
php7.3-common:i386 : Depends: php-common:i386 (>= 1:35) but it is not installable
E: Unable to correct problems, you have held broken packages.
##### И еще вот так пробуем
[email protected]:/# apt install php7.3-common:i386 php-common:i386
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package php-common:i386 is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package 'php-common:i386' has no installation candidate
apt install php-common:all
- then it is put. But it still doesn't work:[email protected]:/# apt install php7.3-common:i386
...
php7.3-common:i386 : Depends: php-common:i386 (>= 1:35) but it is not installable
E: Unable to correct problems, you have held broken packages.
apt install php-cli:amd64
- it works perfectly. And if you create an i386 virtual machine (arch shows i686), then php-cli will be fine. And it uses php-common version 2:69, architecture all. (That is, the same package, which was not suitable for dependencies, is now suitable) [email protected]:/tmp# dpkg --force all -i php7.3-common_7.3.14-1~deb10u1_i386.deb
...
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question