-1

I used the following command after finding it on a thread:

$ sudo dpkg -i --force-overwrite atom-amd64.deb
 (Reading database ... 256705 files and directories currently installed.)
Preparing to unpack atom-amd64.deb ...
Unpacking atom (1.19.1) over (1.19.1) ...
dpkg: dependency problems prevent configuration of atom:
 atom depends on git; however:
  Package git is not installed.
dpkg: error processing package atom (--install):
 dependency problems - leaving unconfigured
Processing triggers for bamfdaemon (0.5.3+17.04.20170406-0ubuntu1) ...
Rebuilding /usr/share/applications/bamf-2.index...
Processing triggers for gnome-menus (3.13.3-6ubuntu5) ...
Processing triggers for desktop-file-utils (0.23-1ubuntu2) ...
Processing triggers for mime-support (3.60ubuntu1) ...
Errors were encountered while processing:
 atom

I am able to open and use atom. No problems yet. But should I do anything about the error message?

muru
  • 197,895
  • 55
  • 485
  • 740
  • How can you say that it is working given that most Atom functionality relies on having git? – Andrea Lazzarotto Aug 15 '17 at 12:40
  • well it started well enough.... i didn't work on it much and yes i did get a warning box that dependencies are missing but the problem got solved after using: sudo apt-get -f install – Rajat Negi Aug 15 '17 at 12:57

1 Answers1

0

Installing packages with options like --force is not a good idea because even if there is a problem you force the package manager to install it anyway . As you may know the package manager (dpkg) has a database and a messed up installation can cause inconsistencies in the database.

As an example you install package xxx10.deb therefore package manager won't let you install xxx9.deb but you can install it with --force option . Now when you are going to remove xxx package manager finds an ambiguity.

I prefer to use apt. You can usually resolve dependency issues with the command

 sudo apt-get -f install
Zanna
  • 70,465
  • Glad to hear . Your welcome – Ali Ghasempour Aug 15 '17 at 06:36
  • I don't think this is quite correct, although I may certainly be wrong. Even using --force won't create database inconsistencies since dpkg knows what you forced it to do. The problem is that --force options allow sets of incompatible packages to be installed and unmet dependencies to arise. – Zanna Aug 15 '17 at 12:41
  • @Zanna Any way using --force is not recommended ... Question ! Why they put option like this !?! – Ali Ghasempour Aug 15 '17 at 13:02
  • Yes I agree with you about that. I think they used --force because they read somewhere that they should and didn't realise the meaning – Zanna Aug 15 '17 at 13:11
  • @Zanna For example you are going to install a package today which need math library and I have to install library by myself . I will tell you install it with --force and I will install library tomorrow ! – Ali Ghasempour Aug 15 '17 at 13:23