Cannot setup AOSP environment in Ubuntu 18.04 ( some packages cannot be installed )

by Rick Sanchez   Last Updated August 01, 2020 14:02 PM

I am trying to setup a new build server for AOSP and ran into problems setting up the environment.
I've done this lots of times without problems, but something seems to have changed.

This is a fresh install of Ubuntu 18.04.4 LTS.
What I'm trying to install is this:

sudo apt-get install git ccache lzop bison gperf build-essential zip curl zlib1g-dev g++-multilib python-networkx libxml2-utils bzip2 libbz2-dev libghc-bzlib-dev squashfs-tools pngcrush liblz4-tool optipng libc6-dev-i386 gcc-multilib libssl-dev gnupg flex lib32ncurses5-dev x11proto-core-dev libx11-dev lib32z1-dev libgl1-mesa-dev xsltproc unzip python-pip python-dev libffi-dev libxml2-dev libxslt1-dev libjpeg8-dev

This is the output:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
curl is already the newest version (7.58.0-2ubuntu3.9).
curl set to manually installed.
build-essential is already the newest version (12.4ubuntu1).
build-essential set to manually installed.
gnupg is already the newest version (2.2.4-1ubuntu1.2).
gnupg set to manually installed.
bzip2 is already the newest version (1.0.6-8.1ubuntu0.2).
bzip2 set to manually installed.
squashfs-tools is already the newest version (1:4.3-6ubuntu0.18.04.1).
squashfs-tools set to manually installed.
git is already the newest version (1:2.17.1-1ubuntu0.7).
git set to manually installed.
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 g++-multilib : Depends: g++-5-multilib (>= 5.3.1-3~) but it is not going to be installed
 gcc-multilib : Depends: gcc-5-multilib (>= 5.3.1-3~) but it is not going to be installed
 lib32ncurses5-dev : Depends: lib32tinfo5 (= 6.0+20160213-1ubuntu1) but it is not going to be installed
                     Depends: lib32ncurses5 (= 6.0+20160213-1ubuntu1) but it is not going to be installed
                     Depends: lib32tinfo-dev (= 6.0+20160213-1ubuntu1) but it is not going to be installed
                     Depends: libncurses5-dev (= 6.0+20160213-1ubuntu1) but it is not going to be installed
 lib32z1-dev : Depends: lib32z1 (= 1:1.2.8.dfsg-2ubuntu4.3) but it is not going to be installed
 libbz2-dev : Depends: libbz2-1.0 (= 1.0.6-8ubuntu0.2) but 1.0.6-8.1ubuntu0.2 is to be installed
              Recommends: bzip2-doc but it is not going to be installed
 libc6-dev-i386 : Depends: libc6-i386 (= 2.23-0ubuntu11.2) but it is not going to be installed
                  Depends: libc6-dev (= 2.23-0ubuntu11.2) but 2.27-3ubuntu1.2 is to be installed
 libffi-dev : Depends: libffi6 (= 3.2.1-4) but 3.2.1-8 is to be installed
 libghc-bzlib-dev : Depends: libghc-base-dev-4.8.2.0-0d6d1
                    Depends: libghc-bytestring-dev-0.10.6.0-9a873
 libgl1-mesa-dev : Depends: mesa-common-dev (= 18.0.5-0ubuntu0~16.04.1) but it is not going to be installed
                   Depends: libdrm-dev (>= 2.4.74) but it is not going to be installed
                   Depends: libx11-xcb-dev but it is not going to be installed
                   Depends: libxcb-dri3-dev but it is not going to be installed
                   Depends: libxcb-present-dev but it is not going to be installed
                   Depends: libxcb-sync-dev but it is not going to be installed
                   Depends: libxcb-dri2-0-dev but it is not going to be installed
                   Depends: libxcb-glx0-dev but it is not going to be installed
 liblz4-tool : Depends: liblz4-1 (= 0.0~r131-2ubuntu2) but 0.0~r131-2ubuntu3 is to be installed
 libssl-dev : Depends: libssl1.0.0 (= 1.0.2g-1ubuntu4.16) but 1.0.2n-1ubuntu5.3 is to be installed
              Recommends: libssl-doc but it is not going to be installed
 libx11-dev : Depends: libx11-6 (= 2:1.6.3-1ubuntu2.1) but 2:1.6.4-3ubuntu0.2 is to be installed
              Depends: libxau-dev (>= 1:1.0.0-1) but it is not going to be installed
              Depends: libxdmcp-dev (>= 1:1.0.0-1) but it is not going to be installed
              Depends: libxcb1-dev but it is not going to be installed
              Recommends: libx11-doc but it is not going to be installed
 libxml2-dev : Depends: libxml2 (= 2.9.3+dfsg1-1ubuntu0.7) but 2.9.4+dfsg1-6.1ubuntu1.3 is to be installed
 libxslt1-dev : Depends: libxslt1.1 (= 1.1.28-2.1ubuntu0.3) but 1.1.29-5ubuntu0.2 is to be installed
 python-dev : Depends: python (= 2.7.12-1~16.04) but 2.7.15~rc1-1 is to be installed
              Depends: libpython-dev (= 2.7.12-1~16.04) but it is not going to be installed
              Depends: python2.7-dev (>= 2.7.12-1~) but it is not going to be installed
 zlib1g-dev : Depends: zlib1g (= 1:1.2.8.dfsg-2ubuntu4.3) but 1:1.2.11.dfsg-0ubuntu2 is to be installed
E: Unable to correct problems, you have held broken packages.

My system info:

[email protected]:~$ uname -a
Linux build-agent08 5.3.0-1032-azure #33~18.04.1-Ubuntu SMP Fri Jun 26 15:01:15 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
[email protected]:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 18.04.4 LTS
Release:    18.04
Codename:   bionic
Tags : 18.04 apt


Related Questions