LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 06-11-2007, 08:22 AM   #1
nautilus
Member
 
Registered: Jun 2007
Location: London, Athens
Distribution: Debian, Ubuntu
Posts: 36

Rep: Reputation: 15
Continuing to upgrade and install new packages with broken dependencies in the system


Hello.

I have intentionally installed a package with missing dependencies (dpkg -i --ignore-depends=...) and now I cannot upgrade my system unless I fix the dependencies:

Quote:

root@mymachine:/root/# apt-get upgrade
Reading Package Lists... Done
Building Dependency Tree... Done
You might want to run `apt-get -f install' to correct these.
The following packages have unmet dependencies:
opennms-webapp: Depends: tomcat4 (>= 4.1.18) but it is not installable
E: Unmet dependencies. Try using -f.
Of course apt-get -f install wants to remove the package with the broken dependency, so this solution is out of question.

What I would ideally want to do is to tell to the system to keep going without caring about this broken dependency...

Is there a way to do this?
 
Old 06-11-2007, 08:36 AM   #2
samael26
Member
 
Registered: Oct 2004
Location: France, Provence
Distribution: Debian
Posts: 848

Rep: Reputation: 30
Hi,

Do a research on APT pinning. You can set a pin priority for a package
/etc/apt/preferences
Package: foo.deb --> your package
Pin: Release 1=MyOwn, version 1.2-3 --> your package version
Pin-Priority: 2000

Hope that helps.

Last edited by samael26; 06-11-2007 at 08:37 AM.
 
Old 06-11-2007, 10:22 AM   #3
nautilus
Member
 
Registered: Jun 2007
Location: London, Athens
Distribution: Debian, Ubuntu
Posts: 36

Original Poster
Rep: Reputation: 15
Hi samael26,

Thanks for your reply. If I got it right, you are suggesting I should pin the package with the broken dependency to its current version and try again, right?

What I've done is this:

Found the version of the package with broken deps:

Quote:
root@mymachine:/etc/apt# dpkg -l | grep opennms-webapp
ii opennms-webapp 1.2.8-1sarge open network monitoring and management appli
And created /etc/apt/preferences and added into it:

Quote:
Package: opennms-webapp
Pin: Release 1=sarge, version 1.2.8-1sarge
Pin-Priority: 2000
and here goes nothing:

Quote:
root@mymachine:/etc/apt# apt-get upgrade
Reading Package Lists... Done
Building Dependency Tree... Done
You might want to run `apt-get -f install' to correct these.
The following packages have unmet dependencies:
opennms-webapp: Depends: tomcat4 (>= 4.1.18) but it is not installable
E: Unmet dependencies. Try using -f.
 
Old 06-13-2007, 06:59 AM   #4
nautilus
Member
 
Registered: Jun 2007
Location: London, Athens
Distribution: Debian, Ubuntu
Posts: 36

Original Poster
Rep: Reputation: 15
Well. I found the solution!!! Here are two actually for people who might have the same problem with me:

SOLUTION 1 (worked for me):

Use equivs. This is a package that creates dummy debian packages to satisfy the dependencies if someone has installed something from source. Here is a helpful link:

http://www.debian.org/doc/manuals/ap...elpers.en.html

If your dependences are already broken and you cannot

Quote:
apt-get install equivs
do:

Quote:
aptitude install equivs
Most probably aptitude will suggest to remove the packages with the broken dependences. So when it asks you if you want to continue, note that the options are not just (Y/n) the are (Y/n/?). Just do ? to see what other options you have... One of them will be = which means hold the package... So your answer is:

Quote:
= <name of the broken package>
And now you have equivs!

SOLUTION 2 (didn't try it since the first one worked for me):

Just use aptitude (its ncurses version), find the package using /, and hold it using =

That is all folks!
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
apt-get upgrade stopped, how can I remove packages before continuing upgrade? [KIA]aze Linux - Newbie 4 05-31-2007 07:49 AM
Unmet Dependancies/Broken Packages - Can't apt-get Build-Install??? Xenoman1 Ubuntu 3 08-07-2006 03:38 AM
System Down: Broken LILO after failed kernel upgrade. Please help! Yalla-One Linux - Software 1 03-30-2005 03:53 PM
install/upgrade packages using tar.gz as opposed to RPM's nishmal Linux - Newbie 2 06-10-2004 11:20 AM
RPM 'failed dependencies': Why can I not install any rpm packages? leontini Linux - Newbie 7 09-16-2003 12:44 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian

All times are GMT -5. The time now is 09:40 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration