Ubuntu: How do I correctly install libpcre3-dev:i386?



Question:

I want to install libpcre3-dev:386 onto 64-bit Ubuntu 14.04.

I have libpcre3:i386 installed, as well as the :x64 -dev version. But if I run 'sudo apt-get install libpcre3-dev:i386', apt wants to remove "all" of my build tools:

Reading package lists... Done  Building dependency tree         Reading state information... Done  ...  The following extra packages will be installed:    libc6-dev:i386 libpcrecpp0:i386 linux-libc-dev:i386  Suggested packages:    glibc-doc:i386 manpages-dev:i386  Recommended packages:    gcc:i386 c-compiler:i386  The following packages will be REMOVED:    build-essential camlp4 dkms dpkg-dev g++ g++-4.7 g++-4.7-multilib g++-4.9    g++-4.9-multilib gcc gcc-4.7 gcc-4.7-multilib gcc-4.9 gcc-4.9-multilib    gcc-multilib hardening-includes lcov libtool lintian ocaml    ocaml-compiler-libs ocaml-interp ocaml-nox pepperflashplugin-nonfree    sa-compile virtualbox-dkms  The following NEW packages will be installed:    libc6-dev:i386 libpcre3-dev:i386 libpcrecpp0:i386 linux-libc-dev:i386  0 upgraded, 4 newly installed, 26 to remove and 11 not upgraded.  

Any idea what it's doing and/or how I can get it to install the 32-bit -dev library?


Disclaimer: I installed GCC 4.9 from a PPA (ppa:ubuntu-toolchain-r/test). After installing, I removed it as a repository; if I re-add it, then gcc-4.9 and its associated packages disappear from the list of things that will be removed:

The following packages will be REMOVED:    build-essential camlp4 dkms dpkg-dev g++ g++-4.7 g++-4.7-multilib gcc    gcc-4.7 gcc-4.7-multilib gcc-4.8 gcc-4.8-multilib gcc-multilib    hardening-includes lcov lintian ocaml ocaml-compiler-libs ocaml-interp    ocaml-nox pepperflashplugin-nonfree sa-compile virtualbox-dkms  The following NEW packages will be installed:    gcc-5-base gcc-5-base:i386 libc6-dev:i386 libpcre3-dev:i386 libpcrecpp0:i386    linux-libc-dev:i386  

I see GCC 5 in that list. Is that causing the problem somehow? I'll leave it enabled for everything else here.


If I download the .deb for libpcre3-dev directly and try to install it with dpkg -i, it says:

dpkg: dependency problems prevent configuration of libpcre3-dev:i386:   libpcre3-dev:i386 depends on libc6-dev.   libpcre3-dev:i386 depends on libpcrecpp0 (= 1:8.31-2ubuntu2).  

Earlier, I tried installing libc6-dev:i386 but it gave me the same list of packages that would be removed.

Also, now if I try to run apt-get again, it complains

You might want to run 'apt-get -f install' to correct these:  The following packages have unmet dependencies:   libpcre3-dev:i386 : Depends: libc6-dev:i386 but it is not going to be installed  E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).  

and if I try to run apt-get -f install, it gives me the same list of packages to remove.

(Incidentally, I've obviated the need for actually installing this for now, by manually unpacking the .deb file in a different location. So now advice for getting apt back into a happy state is more important, though I would still like to know what was going wrong originally.)


Solution:1

See this StackOverflow post. It's trying to purge your package (and dependencies) and redownload it all back. Instead, try running sudo apt-get install --reinstall libc6-dev-i386


Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Previous
Next Post »