64-bit not making use of 32bit libraries even they have been installed

Asked by sapna

I am trying to install 32-bit IDL on 64-bit ubunut 16.04......i have installed all i386 libraries installation went fine but on running idl i get error
/idl/idl70/bin/bin.linux.x86/idl: error while loading shared libraries: libXpm.so.4: wrong ELF class: ELFCLASS64

sap@sap-ThinkCentre-M93p:~$ locate libXpm.so.4
/usr/lib/x86_64-linux-gnu/libXpm.so.4
/usr/lib/x86_64-linux-gnu/libXpm.so.4.11.0

I think i know the problem that it is including libXpm.so.4 of 64 bit.

Can you please tell me how can i install libXpm.so.4 for 32-bit?
 i did sudo apt-get install libxpm4:i386 but this is also not working.

Any help?

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Solved by:
sapna
Solved:
Last query:
Last reply:
Revision history for this message
Manfred Hampl (m-hampl) said :
#1

What is the output of the following commands

uname -a
lsb_release -crid
dpkg --print-architecture
dpkg --print-foreign-architectures
apt-get policy libxpm4 libxpm4:i386
sudo apt-get install libxpm4:i386
sudo updatedb
locate libXpm.so.4
ldd /idl/idl70/bin/bin.linux.x86/idl

Revision history for this message
sapna (sapna) said :
#2

uname -a:Linux sap-ThinkCentre-M93p 4.4.0-21-generic #37-Ubuntu SMP Mon Apr 18 18:33:37 UTC 2016 x86_64 x86_64 x86_64

lsb_release -crid:
GNU/Linux
Distributor ID: Ubuntu
Description: Ubuntu 16.04 LTS
Release: 16.04
Codename: xenial
dpkg --print-architecture:amd64
dpkg --print-foreign-architectures:i386
apt-get policy libxpm4 libxpm4:i386:E: Invalid operation policy
sudo apt-get install libxpm4:i386:

Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
  libxpm4:i386
0 upgraded, 1 newly installed, 0 to remove and 3 not upgraded.
Need to get 0 B/32.1 kB of archives.
After this operation, 108 kB of additional disk space will be used.
(Reading database ... 186674 files and directories currently installed.)
Preparing to unpack .../libxpm4_1%3a3.5.11-1_i386.deb ...
Unpacking libxpm4:i386 (1:3.5.11-1) ...
dpkg: error processing archive /var/cache/apt/archives/libxpm4_1%3a3.5.11-1_i386.deb (--unpack):
 trying to overwrite shared '/usr/share/doc/libxpm4/changelog.Debian.gz', which is different from other instances of package libxpm4:i386
Errors were encountered while processing:
 /var/cache/apt/archives/libxpm4_1%3a3.5.11-1_i386.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

Revision history for this message
Manfred Hampl (m-hampl) said :
#3

Sorry, was a typo error in one of my commands

apt-cache policy libxpm4 libxpm4:i386

Revision history for this message
sapna (sapna) said :
#4

 sudo apt-cache policy libxpm4 libxpm4:i386

libxpm4:
  Installed: 1:3.5.11-1
  Candidate: 1:3.5.11-1
  Version table:
 *** 1:3.5.11-1 500
        500 http://in.archive.ubuntu.com/ubuntu xenial/main amd64 Packages
        100 /var/lib/dpkg/status
libxpm4:i386:
  Installed: (none)
  Candidate: 1:3.5.11-1
  Version table:
     1:3.5.11-1 500
        500 http://in.archive.ubuntu.com/ubuntu xenial/main i386 Packages

Revision history for this message
Manfred Hampl (m-hampl) said :
#5

You might try forcing an installation of the 32bit version by overwriting the changelog with

sudo apt-get -o Dpkg::Options::="--force-overwrite" install libxpm4:i386

Probably a packaging bug.

Revision history for this message
sapna (sapna) said :
#6

It worked.

Thanks alot..... I was about to replace my 64 bit with 32 bit ubuntu.
Thanks...