我正在尝试将 VS Code 安装到 Ubuntu 18.04.1 中,但系统找不到 libgconf-2-4。
> sudo dpkg -i code_1.25.1-1531323788_amd64.deb
Selecting previously unselected package code.
(Reading database ... 146489 files and directories currently installed.)
Preparing to unpack code_1.25.1-1531323788_amd64.deb ...
Unpacking code (1.25.1-1531323788) ...
dpkg: dependency problems prevent configuration of code:
code depends on libgconf-2-4; however:
Package libgconf-2-4 is not installed.
dpkg: error processing package code (--install):
dependency problems - leaving unconfigured
Processing triggers for gnome-menus (3.13.3-11ubuntu1) ...
Processing triggers for desktop-file-utils (0.23-1ubuntu3.18.04.1) ...
Processing triggers for mime-support (3.60ubuntu1) ...
Errors were encountered while processing:
code
我尝试手动安装库 libgconf-2-4,但是它有更多的依赖项,而且我不想如此循环地安装。
有办法安装吗更轻松?
谢谢!
答案1
我遇到了同样的问题。尝试以下命令。
sudo apt --fix-broken install
sudo dpkg -i code_*.deb
它对我有用。希望它能帮到你。
答案2
使用gdebi
而不是dpkg
安装“发行版外”的 deb 文件。gdebi
将安装的依赖项deb
(假设它们在 Ubuntu 存储库中),然后安装 deb。
sudo apt-get install gdebi-core
sudo gdebi code_*.deb