Unable to locate package libc6-dev-i386

38,894

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.

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).

Share:
38,894

Related videos on Youtube

commonSense
Author by

commonSense

Stepping closer toward curiosity.

Updated on September 18, 2022

Comments

  • commonSense
    commonSense over 1 year

    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,

    1. sudo apt install libc6-dev-i386

    2. 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.

    3. sudo apt install -f, even though i don't know what -f stands for.

    4. 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.