I am on Debian Stretch and need google-perftools to profile some programs of mine. My machine is 64-bit; I build the programs for both 64 and 32-bit (using gcc -m32). I want to be able to profile both. I already have libgoogle-perftools-dev installed. When I now try to add the x86 variant, apt wants to remove the x64 variant (see below). Is it possible to install the two variants alongside each other?

$ sudo apt install libgoogle-perftools-dev:i386
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  libboost-chrono1.62.0 libboost-program-options1.62.0 libboost-regex1.62.0 libboost-thread1.62.0 libstemmer0d
  libunwind-dev libunwind8 libunwind8-dev libyaml-cpp0.5v5 mongo-tools
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
  libgoogle-perftools4:i386 libstdc++6:i386 libtcmalloc-minimal4:i386
The following packages will be REMOVED:
  google-perftools libgoogle-perftools-dev libgoogle-perftools4 libtcmalloc-minimal4 mongodb mongodb-clients
The following NEW packages will be installed:
  libgoogle-perftools-dev:i386 libgoogle-perftools4:i386 libstdc++6:i386 libtcmalloc-minimal4:i386
0 upgraded, 4 newly installed, 7 to remove and 0 not upgraded.
Need to get 1,247 kB of archives.
After this operation, 115 MB disk space will be freed.
Do you want to continue? [Y/n] 

The various google-perftools packages don’t have the necessary Multi-Arch: declarations in their control file, so no, it isn’t possible to install the i386 and amd64 packages in parallel (short of force-installing them, which will cause apt to complain a lot and prevent installing or upgrading any other package).

You might want to file a bug asking for this to be enabled. To do so, run reportbug libgoogle-perftools-dev and follow the prompts.

See How do I run 32-bit programs on a 64-bit Debian/Ubuntu? for other ways to run 32-bit programs on a 64-bit system (as suggested by Gilles).

Your Answer

By clicking "Post Your Answer", you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.