6

I'm trying to install VS Code into a Ubuntu 18.04.1 but system can't found 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

I tried installing the library libgconf-2-4 manually but it have more dependencies and I don't want to be that cyclically.

Are there a way to install it easier?

Thanks!

2 Answers2

4

I met with the same problem. Try the following commands.

sudo apt --fix-broken install
sudo dpkg -i code_*.deb

It works for me. Hope it helps you.

francis
  • 41
3

Use gdebi instead of dpkg to install "out of distro" deb files. gdebi will install the dependencies of the deb (provided they are in the Ubuntu repositories), and then the deb.

sudo apt-get install gdebi-core
sudo gdebi code_*.deb
zwets
  • 12,354