2

I am trying to install packages with this command:

sudo apt-get -f install lib32z1 lib32ncurses5 lib32stdc++6

But I am getting errors during the installation. Error looks like:

pkg-name : Depends: pkg-name (= X.X) but it is not going to be installed

Here are some screenshots:

Errors - 1

Errors - 2

Any suggestions?

edwinksl
  • 23,789
  • 3
    http://askubuntu.com/questions/637113/unable-to-locate-package-lib32bz2-1-0 maybe the solution ... – TONTONFLASH Sep 03 '16 at 15:37
  • 1
    "http://askubuntu.com/a/771791/437449" you can try this solution. – al0s Sep 03 '16 at 17:14
  • If you were dealing w/ PPAs, then a solution could be found here – David your friend Sep 03 '16 at 17:17
  • 1
    @TONTONFLASH I don't think that is the solution because here apt isn't reporting package not found. instead showing dependency error.

    Bhvya Dhiman, please post your apt-cache policy output to the post editing it. also apt-cache policy gcc-5-base

    – Anwar Sep 04 '16 at 06:28

2 Answers2

4

Those packages have been replaced under the newer multiarch specification, so add :i386 to specify the 32-bit version if you are running a 64-bit system, otherwise APT will assume you want the 64-bit version.

This works for me in Ubuntu 16.04:

sudo apt install zlib1g:i386 libncurses5:i386 libstdc++6:i386

Thanks to comment by TONTONFLASH leading to the other post where another comment by steeldriver gave the necessary hint.

Zanna
  • 70,465
  • 1
    The packages are same. but if you want to install 32bit packages in a 64bit system, you need to append those. otherwise apt will think you wanted 64bit versions of those packages – Anwar Sep 03 '16 at 17:26
  • 1
    thanks @Anwar I keep trying to clarify this post and getting distracted by chat >_< is it OK now? – Zanna Sep 03 '16 at 17:33
  • did'nt work @Zanna – Bhavya Dhiman Sep 03 '16 at 19:03
  • OK @BhavyaDhiman I may have to delete my post, but please first try doing dpkg --add-architecture i386 && sudo apt update and let me know the result – Zanna Sep 03 '16 at 19:46
  • does 'nt work , permission denied, and i don't know how to apply chmod +x to this ? @Zanna – Bhavya Dhiman Sep 04 '16 at 09:26
  • @BhavyaDhiman sorry, you need sudo at the start sudo dpkg --add-architecture i386 and then sudo apt update – Zanna Sep 04 '16 at 09:28
  • @BhavyaDhiman you were requested to give the output of apt-cache policy – Anwar Sep 06 '16 at 05:18
0

1. Enter this command:

sudo apt-get -f install

This is an 'apt' command to fix dependencies ("-f").

2. Then enter this command:

sudo dpkg --configure -a

3. Lastly enter this command (from 'Step 1'):

sudo apt-get -f install

0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.

This output indicates that the above did not work