Unable to locate package libc6-dev-i386
I’m trying to install NS3, and got stuck at this package, libc6-dev-i386, installation.
sudo apt-get install cmake libc6-dev libc6-dev-i386 g++-multilib
I’ve tried all the possible solution that i can find on the google, so far.
Some details:
sudo dpkg --print-architectures
i386
I’ve tried direct command,
-
sudo apt install libc6-dev-i386
-
sudo dpkg --add-architecture i386
, and then try to run the update command.But again no luck, and i think this attempt is stupid coz my base architecture is i386, so i don’t need to add it(can anybody confirm), but i tried it any way.
-
sudo apt install -f
, even though i don’t know what-f
stands for. -
I’ve also read that this package automatically installed with g++, and I’ve g++ 6.3.0.
I get the same error after all of those tries:
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package libc6-dev-i386
I’m not getting, locate where, in the website?
EDIT
The o/p of, lsb_release -a.,
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 17.04
Release: 17.04
Codename: zesty
uname -a —
Linux tafri-HP-Pavilion-15-Notebook-PC 4.10.0-32-generic #36-Ubuntu SMP Tue Aug 8 12:09:08 UTC 2017 i686 i686 i686 GNU/Linux
and yes i’m following instruction from.,
https://www.nsnam.org/wiki/Installation
and, that “s” at the end of “architecture”, is my bad. I was trying the foreign command.
The development library libc6-dev-i386
is only necessary for developing 32-bit software in a 64-bit OS.
According to the results posted (pending confirmation) the OS is 32-bit (i386) therefore it doesn’t require the said library and the library isn’t available in the repositories (it is available for 64-bit Ubuntu only).
The installation can proceed without it.
On 32-bit Ubuntu, skip that package. Just install libc6-dev
and whatever other packages you need.
The specific package that corresponds to libc6-dev-i386
for a 32-bit system is just libc6-dev
, which you are already installing.
There is no libc6-dev-i386
package for your system, because it’s only available on 64-bit systems. This, in turn, is because its purpose is to provide you with the ability to build and run 32-bit programs on a 64-bit system.
Ubuntu supports several architectures. For PCs, meaning most desktops and laptops, including those manufactured by Apple in recent years, there are two: i386 for 32-bit systems and amd64 for 64-bit systems. For the rest of this answer when I say “32-bit” and “64-bit” I am referring to those architectures specifically. (These confusingly named architectures have important differences, hardware may support both or just i386 though you may need the amd64 version on UEFI systems, and you can check the architecture of your machine or Ubuntu installation.)
64-bit processors are capable of running both 64-bit and 32-bit native (machine language) code.
- If you have the 64-bit (amd64) version of Ubuntu, you can automatically run 64-bit programs.
- You can also run 32-bit programs, but you may need to install 32-bit support libraries, including the 32-bit version of
libc6
.
To run, most programs require the libraries provided by the libc6
package. Ubuntu has this package installed already. Like most (but not all) packages in Ubuntu, the libc6
package is provided separately for different architectures.
To create an executable that links to the libraries provided by libc6
, you need to have the header files for that library. Those are provided by the libc6-dev
package. The libc6-dev
package also declares the libc6
package as a dependency, because it would not usually be useful to have just the header files but not the library itself. Most -dev
packages declare some corresponding non--dev
package as a dependency.
Because the vast majority of programs require libc6
directly or indirectly, more than one way to install the 32-bit version of this library and its header files on a 64-bit system has been provided over the years.
- The most general way, which works with almost every other library as well, is to use APT’s multiarch support—multiarch is enabled by default on all recent Debian and Ubuntu systems–by running
dpkg --add-architecture i386
and usingapt
orapt-get
to install thelibc6:i386
andlibc6-dev:i386
packages.apt
andapt-get
support specifying the architecture of a package to install using this:
syntax. - However, there are other ways. The 32-bit (
i386
) versions of some commonly needed libraries are provided as specialamd64
-only packages.libc6-i386
andlibc6-dev-i386
are two such packages. Thelibc6-dev-i386
package provides the 32-bit versions of header files that differ between architectures while declaring as dependencieslibc6-dev
, which is sufficient for the others, andlibc6-i386
, which provides the actual 32-bit libraries. - The old way to install common 32-bit libraries on a 64-bit system was with the
ia32-libs
package.
Based on the commands you ran, it seems like you tried both of the first two methods, or a combination of the two. However, your system neither requires nor is capable of either, since it’s a 32-bit system. 32-bit systems don’t need anything special to be able to run 32-bit programs (and they cannot run 64-bit programs).
Building dependency tree
Reading state information… Done
E: Unable to locate package libc6:i386
This error can occur when the i386 architecture is not enabled on the Ubuntu system. To enable it, you can follow these steps:
- Open the terminal on your Ubuntu system.
- Run the following command to update the package lists: sudo apt update
- Install the necessary packages to enable the i386 architecture: sudo dpkg –add-architecture i386
- Update the package lists again: sudo apt update
- Try installing the package again: sudo apt install libc6:i386
This should resolve the issue and allow you to install the necessary package.