Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

This question already has an answer here:

I'm trying to install MySQL Workbench on my Ubuntu box (11.04). The website has a Ubuntu .deb available for download (for 10.10 and 10.04 so I chose 10.10).

However,

sudo dpkg -i mysql-workbench-gpl-5.2.34-1ubu1010-amd64.deb

yields:

(Reading database ... 194069 files and directories currently installed.)
Preparing to replace mysql-workbench-gpl 5.2.34-1ubu1010 (using mysql-workbench-gpl-5.2.34-1ubu1010-amd64.deb) ...
Unpacking replacement mysql-workbench-gpl ...
dpkg: dependency problems prevent configuration of mysql-workbench-gpl:
 mysql-workbench-gpl depends on libctemplate0; however:
  Package libctemplate0 is not installed.
 mysql-workbench-gpl depends on libpython2.6 (>= 2.6); however:
  Package libpython2.6 is not installed.
 mysql-workbench-gpl depends on libzip1 (>= 0.8); however:
  Package libzip1 is not installed.
 mysql-workbench-gpl depends on python-paramiko; however:
  Package python-paramiko is not installed.
 mysql-workbench-gpl depends on python-pysqlite2; however:
  Package python-pysqlite2 is not installed.
dpkg: error processing mysql-workbench-gpl (--install):
 dependency problems - leaving unconfigured
Processing triggers for bamfdaemon ...
Rebuilding /usr/share/applications/bamf.index...
Processing triggers for desktop-file-utils ...
Processing triggers for python-gmenu ...
Rebuilding /usr/share/applications/desktop.en_US.utf8.cache...
Processing triggers for python-support ...
Errors were encountered while processing:
 mysql-workbench-gpl

My question is, is there a way to tell dpkg to automatically fetch missing dependencies, or do I need to manually apt-get install missing packages like libctemplate0 and libpython2.6?

(Or alternatively, is there some other way to get MySQL Workbench easily up & running?)

share|improve this question

marked as duplicate by Braiam, KasiyA, muru, Charles Green, Andrea Corbellini Oct 29 at 13:36

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

5 Answers 5

up vote 52 down vote accepted

You can install a package and get dependencies from repositories with

sudo gdebi package.deb

If you already installed the package with missed dependencies, you can dowload and install dependencies automatically with

sudo apt-get -f install

Also available is a graphical version gdebi-gtk, linked to .deb nautilus right click action "Open With GDebi Package Installer".

share|improve this answer
1  
Thanks, sudo gdebi mysql-workbench-gpl-5.2.34-1ubu1010-amd64.deb worked smoothly. Looks like gdebi is exactly the tool I needed. –  Jonik Aug 22 '11 at 12:16
1  
nice one there,thanx ;-) –  Pavlos G. Aug 22 '11 at 12:23
1  
+1 for gdebi :) –  Rafał Cieślak Aug 22 '11 at 13:51
2  
Note that double clicking on the deb file should work too. It will use gdebi on older Ubuntu versions and the Software Centre in newer. –  Javier Rivera Aug 23 '11 at 8:59

dpkg itself is not capable of managing repositories. It is required to use a higher-level tool, like apt-get, to fetch anything from repositories. dkpg is only the core tool, that installs/removes/configures packages, taking care of dependencies and other factors. apt-get and aptitude are tools that manage repositories, download data from them, and use dkpg to install/remove packages from them. This means, that apt-get and aptitude can resolve dependencies and get required packages from repository, but dpkg cannot, because it knows nothing about repositories.

share|improve this answer
6  
Good background information but not a useful answer. –  foraidt Aug 22 '11 at 12:27

That particular library(libctemplate0) I downloaded it from

http://packages.ubuntu.com/lucid/amd64/libctemplate0/download

The direct link http://ubuntu.wikimedia.org/ubuntu//pool/universe/c/ctemplate/libctemplate0_0.96-0ubuntu1_amd64.deb

The mySQL-workbench installation went smoothly after that.

share|improve this answer
    
thank you , this was where I was stuck. –  vishal Aug 7 '13 at 18:39

Right click on the package file and select "open with Ubuntu software center", It will install everything for you.

share|improve this answer

AFAIK, dpkg provides no mechanism for dependency resolving. It checks/warns for dependencies, but does not do any further action. You'll have to solve the problems on your own.

As the Debian wiki states here:

dpkg checks dependencies and will refuse to install a package whose dependencies aren't met, but it won't help you find and install those dependencies. You need a higher-level tool (eg dselect or apt-get) for that.

So i think that you'll have to use apt-get or aptitude in order to install the package you're interested in, as well as any dependencies involved.

Update: Since this package is not in the 11.04 repositories, just run:

sudo apt-get install libctemplate0 libzip1 libpython2.6 python-pysqlite2 python-paramiko

and then

sudo dpkg -i mysql-workbench-gpl-5.2.34-1ubu1010-amd64.deb

and you should be ok.

share|improve this answer
    
Running 11.04 also, but I get "has no installation candidate" for most of the packages in your first apt-get. Am I missing something? –  John C May 21 '12 at 18:21

Not the answer you're looking for? Browse other questions tagged or ask your own question.