Ubuntu 18.04 installs the latest version of Visual Studio Code (VS Code) and reports an error that the dependent library version is too low
Ubuntu 18.04 installs the latest version of Visual Studio Code (VS Code) and reports an error that the dependent library version is too low
Ubuntu 18.04 installs the latest version of Visual Studio Code (VS Code) and reports an error that the dependent library version is too low
- 1. Problem description
- 2. Solution
-
- 2.1 Fix errors in previous installations
- 2.2 Install VS Code 1.85.2
- 3. Cause analysis
1. Problem description
When installing VS Code ≥ v1.86.2
(tested ) on Ubuntu 18.04 system , problems such as , , and the dependent libraryv1.87.1
version being too low will be reported , as shown in the first terminal command below.libc6``libgssapi-krb5-2``libxkbfile1
bit202@bit202-OMEN:~$ sudo dpkg -i '/home/bit202/desktop/code_1.86.2-1707854558_amd64.deb'
Unselected package code is being selected.
(The database is being read ... There are currently 335835 files and directories installed on the system.)
Preparing to unpack ... /code_1.86.2-1707854558_amd64.deb ...
Unpacking code (1.86.2-1707854558) ...
dpkg: Dependency issues prevent code configuration from continuing:
code depends on libc6 (>= 2.28); however:
The version of libc6:amd64 on the system is 2.27-3ubuntu1.6.
code depends on libgssapi-krb5-2 (>= 1.17); however:
The system version of libgssapi-krb5-2:amd64 is 1.16-2ubuntu0.4.
code depends on libxkbfile1 (>= 1:1.1.0); however:
The system version of libxkbfile1:amd64 is 1:1.0.9-2.
dpkg: Error processing package code (--install):
Dependency issue - still not configured
Working on triggers for gnome-menus (3.13.3-11ubuntu1.1) ...
Trigger for desktop-file-utils (0.23-1ubuntu3.18.04.2) being processed ...
Triggers for mime-support (3.60ubuntu1) are being processed ...
Trigger for shared-mime-info (1.9-2) being processed ...
Unknown media type in type 'all/all'
Unknown media type in type 'all/allfiles'
An error occurred during processing:
code
And even if these libraries are updated, the version requirements cannot be met, as shown in the following terminal command:
bit202@bit202-OMEN:~$ sudo apt-get install libc6 libgssapi-krb5-2 libxkbfile1
Reading package list... Finished
Analyzing package dependency tree
Reading status information... Finished
libxkbfile1 is up to date (1:1.0.9-2).
libc6 is up to date (2.27-3ubuntu1.6).
libgssapi-krb5-2 is the latest version (1.16-2ubuntu0.4).
0 packages upgraded, 0 packages newly installed, 0 packages to be uninstalled, 340 packages not upgraded.
It is not impossible to use the latest version of VS Code , but I feel that it will not record my usage progress very well, and other problems have not been discovered yet.
2. Solution
Test the latest VS Code v1.85.2
version that can be installed ( November 2023 version ).
2.1 Fix errors in previous installations
That is, uninstall the higher version of VS Code installed before.
bit202@bit202-OMEN:~$ sudo apt-get -f install
Reading package list... Finished
Analyzing package dependency tree
Reading status information... Finished
Fixing dependencies... Finished
The following packages will be uninstalled:
code
0 packages upgraded, 0 packages newly installed, 1 package to be uninstalled, 340 packages not upgraded.
1 package was not fully installed or uninstalled.
Unpacking will free up 397 MB of space.
Do you wish to continue? [Y/n] y
(The database is being read ... There are currently 337279 files and directories installed on the system.)
Uninstalling code (1.86.2-1707854558) ...
Unknown media type in type 'all/all'
Unknown media type in type 'all/allfiles'
Working on triggers for desktop-file-utils (0.23-1ubuntu3.18.04.2) ...
Trigger for shared-mime-info (1.9-2) being processed ...
Unknown media type in type 'all/all'
Unknown media type in type 'all/allfiles'
Triggers for gnome-menus (3.13.3-11ubuntu1.1) are being processed ...
Trigger for mime-support (3.60ubuntu1) being processed ...
2.2 Install VS Code 1.85.2
bit202@bit202-OMEN:~$ sudo dpkg -i '/home/bit202/desktop/code_1.85.2-1705561292_amd64.deb'
Unselected package code is being selected.
(The database is being read ... There are currently 335835 files and directories installed on the system.)
Preparing to unpack ... /code_1.85.2-1705561292_amd64.deb ...
Unpacking code (1.85.2-1705561292) ...
Setting code (1.85.2-1705561292) ...
Unknown media type in type 'all/all'
Unknown media type in type 'all/allfiles'
Working on triggers for gnome-menus (3.13.3-11ubuntu1.1) ...
Working on triggers for desktop-file-utils (0.23-1ubuntu3.18.04.2) ...
Triggers for mime-support (3.60ubuntu1) are being processed ...
Trigger for shared-mime-info (1.9-2) being processed ...
Unknown media type in type 'all/all'
Unknown media type in type 'all/allfiles'
3. Cause analysis
It may be that the latest version of Ubuntu 18.04's support for the above libraries is too low, that is, the Ubuntu 18.04 system is too old.