Today, I wanted to update my Ubuntu WSL setup by running sudo apt upgrade
. Unfortunately, it failed with the following problem:
2 | Reading package lists... Done |
3 | Building dependency tree... Done |
4 | Reading state information... Done |
5 | Calculating upgrade... Done |
6 | The following packages were automatically installed and are no longer required: |
7 | golang-1.18 golang-1.18-doc golang-1.18-go golang-1.18-src libarmadillo10 libatk1.0-data libavcodec58 libavdevice58 |
8 | libavfilter7 libavformat58 libavutil56 libcharls2 libdav1d5 libdns-export1110 libgdal30 libgeos3.10.2 |
9 | libisc-export1105 libllvm13 libpoppler118 libpostproc55 libproj22 libsrt1.4-gnutls libswresample3 libswscale5 |
10 | libx264-163 python3-toml |
11 | Use 'sudo apt autoremove' to remove them. |
12 | E: Could not read response to hello message from hook [ ! -f /usr/lib/ubuntu-advantage/apt-esm-json-hook ] || /usr/lib/ubuntu-advantage/apt-esm-json-hook || true : Success |
13 | E: Could not read response to hello message from hook [ ! -f /usr/lib/ubuntu-advantage/apt-esm-json-hook ] || /usr/lib/ubuntu-advantage/apt-esm-json-hook || true : Success |
To fix this problem, I went ahead and removed these files:
1 | sudo rm /etc/apt/apt.conf.d/51ubuntu-advantage-esm |
2 | sudo rm /etc/apt/apt.conf.d/20apt-esm-hook.conf |
After running sudo apt upgrade
again, this time it succeeded:
2 | Reading package lists... Done |
3 | Building dependency tree... Done |
4 | Reading state information... Done |
5 | Calculating upgrade... Done |
6 | The following packages were automatically installed and are no longer required: |
7 | golang-1.18 golang-1.18-doc golang-1.18-go golang-1.18-src libarmadillo10 libatk1.0-data libavcodec58 libavdevice58 |
8 | libavfilter7 libavformat58 libavutil56 libcharls2 libdav1d5 libdns-export1110 libgdal30 libgeos3.10.2 |
9 | libisc-export1105 libllvm13 libpoppler118 libpostproc55 libproj22 libsrt1.4-gnutls libswresample3 libswscale5 |
10 | libx264-163 python3-toml |
11 | Use 'sudo apt autoremove' to remove them. |
12 | The following NEW packages will be installed: |
13 | at-spi2-common xfonts-encodings xfonts-utils |
14 | The following packages have been kept back: |
15 | apparmor bash binutils binutils-common binutils-x86-64-linux-gnu cpp g++ gcc gcc-12-base libatomic1 libbinutils |
16 | libboost-atomic1.74-dev libboost-atomic1.74.0 libboost-chrono1.74-dev libboost-chrono1.74.0 |
17 | libboost- date -time1.74-dev libboost- date -time1.74.0 libboost-iostreams1.74-dev libboost-iostreams1.74.0 |
18 | libboost-regex1.74-dev libboost-regex1.74.0 libboost-serialization1.74-dev libboost-serialization1.74.0 |
19 | libboost-system1.74-dev libboost-system1.74.0 libboost-thread1.74-dev libboost-thread1.74.0 libboost1.74-dev |
20 | libc-bin libc-dev-bin libc6 libc6-dev libcc1-0 libctf0 libcups2 libexpat1 libexpat1-dev libgcc-s1 libgfortran5 |
21 | libgl1-mesa-dri libglapi-mesa libglx-mesa0 libgomp1 libgprofng0 libitm1 liblsan0 libnss-systemd libobjc4 |
22 | libpam-systemd libquadmath0 libstdc++6 libsystemd-dev libsystemd0 libubsan1 libudev1 locales manpages |
23 | mesa-vdpau-drivers mesa-vulkan-drivers openssh-client openssh-server openssh- sftp -server passwd sudo systemd |
24 | systemd-sysv systemd-timesyncd tmux udev |
25 | The following packages will be upgraded: |
26 | alsa-ucm-conf apport apt apt-utils at-spi2-core base-files cloud-init curl dbus dbus-bin dbus-daemon |
27 | dbus-session-bus-common dbus-system-bus-common dbus-user-session device-tree-compiler dh-python distro-info |
28 | distro-info-data dnsmasq-base fonts-urw-base35 ghostscript git git- man golang-1.19 golang-1.19-doc golang-1.19-go |
29 | golang-1.19-src icu-devtools isc-dhcp-client isc-dhcp-common klibc-utils libapache2-mod-php8.1 libapparmor1 |
30 | libapt-pkg6.0 libatk-bridge2.0-0 libatk1.0-0 libatspi2.0-0 libctf-nobfd0 libcurl3-gnutls libcurl4 |
31 | libcurl4-openssl-dev libdbus-1-3 libdrm-amdgpu1 libdrm-common libdrm-intel1 libdrm-nouveau2 libdrm-radeon1 libdrm2 |
32 | libdw1 libelf1 libfdt1 libgbm1 libglib2.0-0 libglib2.0-bin libglib2.0-data libgnutls-openssl27 libgnutls30 libgs9 |
33 | libgs9-common libicu-dev libicu71 libjbig0 libklibc libksba8 libmp3lame0 libmysqlclient-dev libmysqlclient21 |
34 | libnginx-mod-http-geoip2 libnginx-mod-http-image-filter libnginx-mod-http-xslt-filter libnginx-mod-mail |
35 | libnginx-mod-stream libnginx-mod-stream-geoip2 libntfs-3g89 libp11-kit0 libparted2 libpcsclite1 libperl5.34 |
36 | libpixman-1-0 libpython3.10 libpython3.10-dev libpython3.10-minimal libpython3.10-stdlib libreadline-dev |
37 | libreadline8 libsndio7.0 libsqlite3-0 libssl-dev libssl3 libsubid4 libtiff-tools libtiff5 libxapian30 linux-libc-dev |
38 | login nginx nginx-common nginx-core ntfs-3g openjdk-8-jdk openjdk-8-jdk-headless openjdk-8-jre |
39 | openjdk-8-jre-headless openssl parted perl perl-base perl-modules-5.34 php8.1 php8.1-cli php8.1-common php8.1-mysql |
40 | php8.1-opcache php8.1-readline php8.1-xml python3-apport python3-distro-info python3-distupgrade |
41 | python3-problem-report python3-software-properties python3-unicodedata2 python3-update-manager python3.10 |
42 | python3.10-dev python3.10-minimal readline-common runc software-properties-common sosreport tzdata u-boot-tools |
43 | ubuntu-release-upgrader-core ubuntu-standard uidmap update-manager-core update-notifier-common |
44 | 136 upgraded, 3 newly installed, 0 to remove and 69 not upgraded. |
45 | Need to get 227 MB of archives. |
46 | After this operation, 1,892 kB of additional disk space will be used. |
47 | Do you want to continue ? [Y/n] |
I’m running my Ubuntu WSL instance in WSL1 mode. Hope this post helps you fix your apt upgrade problem if you have encountered this same issue.
Post Views: 396