我正在 ubuntu linux 中安装 vscode...但是我遇到了一些未满足的依赖项错误

问题描述 投票:0回答:1
ayushjain@ubuntu:~/Downloads$ sudo apt install --reinstall ./code_1.88.1-1712771838_amd64.deb 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Note, selecting 'code' instead of './code_1.88.1-1712771838_amd64.deb'
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:
 code : Depends: libc6 (>= 2.28) but 2.23-0ubuntu11.3 is to be installed
        Depends: libgssapi-krb5-2 (>= 1.17) but 1.13.2+dfsg-5ubuntu2.2 is to be installed
        Depends: libnss3 (>= 2:3.30) but 2:3.28.4-0ubuntu0.16.04.14 is to be installed
        Depends: libxkbfile1 (>= 1:1.1.0) but 1:1.0.9-0ubuntu1 is to be installed
E: Unable to correct problems, you have held broken packages.


I tried installing the vscode using command sudo apt install /.code
but it is throwing 
The following packages have unmet dependencies:
 code : Depends: libc6 (>= 2.28) but 2.23-0ubuntu11.3 is to be installed
        Depends: libgssapi-krb5-2 (>= 1.17) but 1.13.2+dfsg-5ubuntu2.2 is to be installed
        Depends: libnss3 (>= 2:3.30) but 2:3.28.4-0ubuntu0.16.04.14 is to be installed
        Depends: libxkbfile1 (>= 1:1.1.0) but 1:1.0.9-0ubuntu1 is to be installed
E: Unable to correct problems, you have held broken packages.

这个错误

ubuntu visual-studio-code vmware-workstation
1个回答
0
投票

导致你走到这一步的可能原因有很多。尝试以下方法,它不会让事情变得更糟,并且可能会解决您遇到的问题

apt
:

$ sudo apt update
$ sudo apt upgrade -f

但是,在 Ubuntu 上安装 VSCode 的推荐方法是使用 Snap,它不会受到

apt
遇到的问题的影响。

$ sudo snap install --classic code

参见:https://code.visualstudio.com/docs/setup/linux#_snap

© www.soinside.com 2019 - 2024. All rights reserved.