Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want to install my project's debian package from a shell script.

For that I'm using the command sudo dpkg -i my_project_0.1.deb. But it's not going to install dependency.

I've also tried sudo dpkg -i --force-depends. But still error.

Below commands can solve the problem,

sudo dpkg -i downloaded_package.deb
sudo apt-get -f install

but I'm looking for any other solution (as it would install broken dependency for all packages).

How could I solve the problem? Is there any other command instead of dpkg?


share|improve this question
Have you tried aptitude as in sudo aptitude install downloaded_package.deb? – N.N. Jul 6 '11 at 10:59
as per your suggestion, I have tried sudo aptitude install downloaded_package.deb and it gives an error : "Couldn't find any package whose name or description matched my_project.deb" – Yajushi Jul 6 '11 at 11:27
Do you provide the correct path in the command? – N.N. Jul 6 '11 at 11:32
Yes, but may be because, my package is not registered as when I've tried sudo aptitude install python-lxml (where python-lxml is registered package on ubuntu archive) It works. – Yajushi Jul 6 '11 at 12:45
@N.N. aptitude cannot take a filename as a parameter, for what I know. – enzotib Jul 6 '11 at 13:07
up vote 4 down vote accepted

Use gdebi (package gdebi-core if it's not installed)

share|improve this answer
Perfectly Working! Thank You! – Yajushi Jul 6 '11 at 12:36

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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