Results 1 to 4 of 4

Thread: apt-get -y upgrade fails apt-get -y dist-upgrade fails

  1. #1
    Join Date
    Dallas, TX USA

    apt-get -y upgrade fails apt-get -y dist-upgrade fails

    I have had this problem before, and the only solution was a new install. I'd like to find a better solution.

    I am running Kali in a virtual (VMware 12.5.1 build 4542065) environment on Windows 8.1.
    I last patched about 2 weeks ago.

    # cat /etc/*release*
    DISTRIB_DESCRIPTION="Kali GNU/Linux Rolling"
    PRETTY_NAME="Kali GNU/Linux Rolling"
    NAME="Kali GNU/Linux"

    Took a snapshot, then booted

    I ran
    apt-get update
    apt-get -y upgrade -d
    (completes OK)
    apt-get -y upgrade

    it says:
    apt-get -y upgrade
    Reading package lists... Done
    Building dependency tree
    Reading state information... Done
    Calculating upgrade... Done
    The following packages were automatically installed and are no longer required:
    iceweasel libradcli4 python-pyregfi reglookup-doc
    Use 'apt autoremove' to remove them.
    The following packages have been kept back:
    gir1.2-mutter-3.0 gnome-shell gnome-shell-common gnome-software
    gnome-software-common imagemagick-common libdbd-mysql-perl libfbclient2
    libmagickcore-6.q16-2 libmagickcore-6.q16-2-extra libmagickwand-6.q16-2
    libmutter0i libvlc5 libvlccore8 mitmproxy mutter mutter-common udisks2 vlc
    vlc-data vlc-nox
    The following packages will be upgraded:
    apktool binutils bluez bluez-hcidump bluez-obexd bsdmainutils commix
    console-setup console-setup-linux cpp-5 cpp-6 cryptsetup cryptsetup-bin
    distro-info-data dkms dos2unix dwarfdump erlang-asn1 erlang-base
    erlang-crypto erlang-eunit erlang-inets erlang-mnesia erlang-os-mon
    erlang-public-key erlang-runtime-tools erlang-snmp erlang-ssl
    erlang-syntax-tools erlang-tools erlang-xmerl ethtool evince evince-common
    exploitdb file flex g++-5 g++-6 gcc-5 gcc-5-base gcc-6 gcc-6-base gdm3
    geoip-database geoip-database-extra gir1.2-gdm-1.0 gir1.2-gtk-3.0
    gir1.2-ibus-1.0 gir1.2-networkmanager-1.0 gir1.2-notify-0.7
    gir1.2-polkit-1.0 gir1.2-wnck-3.0 git git-man
    gnome-shell-extension-dashtodock gnome-shell-extension-refreshwifi
    gnome-shell-extension-workspacestodock gnome-shell-extensions gnome-terminal
    gnome-terminal-data gnuplot gnuplot-data gnuplot-qt
    greenbone-security-assistant grub-common grub-pc grub-pc-bin grub2-common
    gtk-update-icon-cache gvfs gvfs-backends gvfs-bin gvfs-common gvfs-daemons
    gvfs-fuse gvfs-libs hashdeep imagemagick imagemagick-6.q16 iproute iproute2
    jarwrapper keyboard-configuration libapache2-mod-php7.0 libapparmor1
    libappstream-glib8 libarchive13 libasan2 libasan3 libatomic1 libavcodec57
    libavfilter6 libavformat57 libavresample3 libavutil55 libbabeltrace-ctf1
    libbabeltrace1 libbluetooth-dev libbluetooth3 libboost-atomic1.61.0
    libboost-chrono1.61.0 libboost-date-time1.61.0 libboost-filesystem1.61.0
    libboost-system1.61.0 libboost-thread1.61.0 libbrlapi0.6 libc-bin
    libc-dev-bin libc-l10n libc6 libc6-dbg libc6-dev libcc1-0 libcilkrts5
    libclang-common-3.8-dev libcommons-lang3-java libcrypto++6 libcryptsetup4
    libdatrie1 libdw1 libegl1-mesa libelf1 libevdocument3-4 libevview3-3
    libfcgi-perl libfl-dev libflite1 libgail-3-0 libgbm1 libgcc-5-dev
    libgcc-6-dev libgcc1 libgdm1 libgeoip1 libgfortran3 libgif7 libgl1-mesa-dri
    libgl1-mesa-glx libglapi-mesa libgles1-mesa libgles2-mesa
    libgnutls-openssl27 libgnutls30 libgom-1.0-0 libgom-1.0-common libgomp1
    libgssdp-1.0-3 libgtk-3-0 libgtk-3-bin libgtk-3-common libgtksourceview2.0-0
    libgtksourceview2.0-common libgupnp-1.0-4 libgupnp-av-1.0-2 libhyphen0
    libibus-1.0-5 libio-socket-socks-perl libiptcdata0 libitm1 libjack-jackd2-0
    libjpeg-turbo-progs libjpeg62-turbo libjs-jquery libjs-sphinxdoc
    libjs-uglify libjsr305-java libllvm3.8 liblsan0 libmagic-dev libmagic-mgc
    libmagic1 libmdb2 libmdbsql2 libmodplug1 libmotif-common libmpx0 libmpx2
    libnautilus-extension1a libnet-ssh2-perl libnewt0.52 libnghttp2-14
    libnm-glib4 libnm-util2 libnm0 libnotify4 libobjc-5-dev libobjc4 libopenvas8
    libopus0 liborc-0.4-0 libosmesa6 libpackagekit-glib2-18 libpolkit-agent-1-0
    libpolkit-backend-1-0 libpolkit-gobject-1-0 libpostproc54 libqtwebkit4
    libquadmath0 libregfi1 librygel-core-2.6-2 librygel-db-2.6-2
    librygel-renderer-2.6-2 librygel-server-2.6-2 libsasl2-2 libsasl2-modules
    libsasl2-modules-db libsepol1 libsqlite3-0 libstdc++-5-dev libstdc++-6-dev
    libstdc++6 libsub-exporter-progressive-perl libswresample2 libswscale4
    libtag1v5 libtag1v5-vanilla libtagc0 libterm-readkey-perl libthai-data
    libthai0 libtracker-control-1.0-0 libtracker-miner-1.0-0
    libtracker-sparql-1.0-0 libtsan0 libturbojpeg0 libubsan0 libudisks2-0
    libupnp6 libuv1 libwayland-egl1-mesa libwnck-3-0 libwnck-3-common
    libwww-mechanize-perl libxapian30 libxatracker2 libxklavier16 libxm4
    libxslt1.1 libyara3 linux-compiler-gcc-5-x86 linux-headers-4.7.0-kali1-amd64
    linux-headers-4.7.0-kali1-common linux-image-4.7.0-kali1-amd64
    linux-kbuild-4.7 linux-libc-dev locales locales-all lsb-base lsb-release mc
    mc-data mdbtools mercurial mercurial-common mesa-opencl-icd
    mesa-vdpau-drivers metasploit-framework mimikatz multiarch-support
    munin-common munin-node munin-plugins-core munin-plugins-extra nautilus
    nautilus-data ndiff network-manager nmap ntp openjdk-8-jdk
    openjdk-8-jdk-headless openjdk-8-jre openjdk-8-jre-headless openvas-manager
    openvas-scanner packagekit packagekit-tools php7.0 php7.0-cli php7.0-common
    php7.0-json php7.0-mysql php7.0-opcache php7.0-readline policykit-1
    policykit-1-gnome python-dnspython python-git python-gitdb python-hyperframe
    python-libxslt1 python-pefile python-pyparsing python-pyregfi python-scipy
    python-smmap python-zope.interface python3-brlapi python3-pyparsing
    python3-scipy recon-ng redis-server redis-tools reglookup reglookup-doc
    responder rsyslog rygel smali sqlite3 t50 tmux tracker tracker-extract
    tracker-gui tracker-miner-fs tzdata volatility volatility-tools w3af
    w3af-console whiptail x11proto-core-dev xbrlapi xsltproc zenmap zlib1g
    328 upgraded, 0 newly installed, 0 to remove and 21 not upgraded.
    Need to get 0 B/453 MB of archives.
    After this operation, 7,874 kB disk space will be freed.
    apt-listchanges: Reading changelogs...
    apt-listchanges: News

    brltty (5.4-1~1) experimental; urgency=medium

    Authenticating BrlAPI clients now defaults to using policykit too.
    It means that logged-in users can now run orca and similar programs
    using brlapi without having to be able to read /etc/brlapi.key,
    which is thus not world-readable by default any more.


    during the unpack/install phase, I get:
    Preparing to unpack .../164-libgl1-mesa-dri_12.0.3-3_amd64.deb ...

    Unpacking libgl1-mesa-dri:amd64 (12.0.3-3) over (12.0.3-1) ...
    dpkg: error processing archive /tmp/apt-dpkg-install-pi5qlW/164-libgl1-mesa-dri_12.0.3-3_amd64.deb (--unpack):
    unable to stat './usr/share/bug/libgl1-mesa-dri/control' (which I was about to install): Structure needs cleaning
    E: Sub-process /usr/bin/dpkg received a segmentation fault.
    W: Problem unlinking the file /var/cache/apt/pkgcache.bin - pkgDPkgPM::Go (30: Read-only file system)

    I have disk space:
    # df -h
    Filesystem Size Used Avail Use% Mounted on
    udev 3.9G 0 3.9G 0% /dev
    tmpfs 798M 11M 788M 2% /run
    /dev/sda1 38G 18G 19G 49% /
    tmpfs 3.9G 300K 3.9G 1% /dev/shm
    tmpfs 5.0M 0 5.0M 0% /run/lock
    tmpfs 3.9G 0 3.9G 0% /sys/fs/cgroup
    tmpfs 798M 28K 798M 1% /run/user/133
    tmpfs 798M 20K 798M 1% /run/user/0

    I have 8GB RAM, 4 CPUs.
    There is nothing else running on the PC

    if I revert to the snapshot and try again, it fails in the same place.
    What is going on?

  2. #2
    Join Date
    Kali forums
    From the error, it appears dpkg is crashing. Anything in dmesg or /var/log?

    You might also try running apt-get autoclean, based on the "Structure needs cleaning". The read-only file system warning makes me wonder if you might have a hard drive issue.

  3. #3
    Join Date
    Dallas, TX USA
    the package causing problems is: libgl1-mesa-dri
    in a test, I did the following:
    apt-get update
    apt-get -y upgrade -d
    made a list of the packages to be upgraded
    applied each individually via
    apt-get -y install PKGNAME --only-upgrade
    upgraded each package but the one named above, then expecting it to crash, I did
    apt-get -y upgrade
    apt-get -y dist-upgrade
    No problems

    If instead, I applied any combination of other packages and then the above package, it went read-only

  4. #4
    Join Date
    do what it tells you then try

    apt autoremove
    Reading package lists... Done
    Building dependency tree
    Reading state information... Done
    Calculating upgrade... Done
    The following packages were automatically installed and are no longer required:
    iceweasel libradcli4 python-pyregfi reglookup-doc
    Use 'apt autoremove' to remove them.
    Last edited by sml156; 2016-11-04 at 03:49.

Similar Threads

  1. Kali Rolling - gdm fails to start after dist-upgrade
    By wtf in forum TroubleShooting Archive
    Replies: 0
    Last Post: 2016-09-25, 07:43
  2. W3AF fails to load after update/upgrade
    By HackR2D2 in forum Installing Archive
    Replies: 5
    Last Post: 2014-11-10, 04:14
  3. GRUB2 Upgrade Fails
    By dba4life in forum Installing Archive
    Replies: 0
    Last Post: 2014-04-20, 23:23
  4. apt-get dist-upgrade fails
    By nix in forum Installing Archive
    Replies: 6
    Last Post: 2014-03-23, 10:51

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts