1

I need to install both 32 and 64 bit versions of musl-tools, but whenever I try to install one the other is automatically uninstalled. If I try both at the same time I get conflicts:

$ sudo apt-get install -y musl-tools gcc gcc-7 cpp binutils musl-tools:i386 gcc:i386 gcc-7:i386 cpp:i386 binutils:i386
The following packages have unmet dependencies:
 binutils : Conflicts: binutils:i386 but 2.30-21ubuntu1~18.04.3 is to be installed
 binutils:i386 : Conflicts: binutils but 2.30-21ubuntu1~18.04.3 is to be installed
 cpp : Depends: cpp-7 (>= 7.4.0-1~) but it is not going to be installed
       Conflicts: cpp:i386 but 4:7.4.0-1ubuntu2.3 is to be installed
 cpp:i386 : Conflicts: cpp but 4:7.4.0-1ubuntu2.3 is to be installed
 gcc : Conflicts: gcc:i386 but 4:7.4.0-1ubuntu2.3 is to be installed
 gcc:i386 : Conflicts: gcc but 4:7.4.0-1ubuntu2.3 is to be installed
 gcc-7 : Depends: cpp-7 (= 7.5.0-3ubuntu1~18.04) but it is not going to be installed
         Conflicts: gcc-7:i386 but 7.5.0-3ubuntu1~18.04 is to be installed
 gcc-7:i386 : Conflicts: gcc-7 but 7.5.0-3ubuntu1~18.04 is to be installed
 musl-tools : Conflicts: musl-tools:i386 but 1.1.19-1 is to be installed
 musl-tools:i386 : Conflicts: musl-tools but 1.1.19-1 is to be installed
E: Unable to correct problems, you have held broken packages.

Here's essentially what I'd like to do:

sudo dpkg --add-architecture i386
sudo apt-get update
sudo apt-get install -y gcc-multilib musl-tools
sudo mv /usr/bin/{,x86_64-linux-}musl-gcc
sudo mv /usr/bin/{,x86_64-linux-}musl-ldd
sudo apt-get install -y musl-tools:i386
sudo mv /usr/bin/{,i386-linux-}musl-gcc
sudo mv /usr/bin/{,i386-linux-}musl-ldd
Max
  • 111
  • 4

1 Answers1

0

Same problem here, this is a re-post from elsewhere of the best explanation I could find for the problem:

Multiarch as of Debian Jessie does not allow the parallel installation of executables:

The package python (for example) contains executables that are installed to /usr/bin (e.g. pdb, pydoc, ...) The package python:armhf also contains those executables and they should also get installed to /usr/bin.

Therefore python and python:armhf can not be installed at the same time since the executables of one package would overwrite the executable of the other package.

The good thing is, that you do not need two python interpreters. In your case I would just install the python interpreter that is needed for the host architecture (e.g. python:amd64). Please note that the installation of build dependencies with a command such as sudo apt-get build-dep -a armhf PACKAGE-NAME might sometimes fail and you have to guess what packages need to be installed manually.