LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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-10-2007, 03:00 PM   #1
144419855310001
Member
 
Registered: Apr 2006
Distribution: ubuntu 7.04
Posts: 219

Rep: Reputation: 30
manually fixing dependencies


Hi

I've actually just installed ubuntu 7.04 amd64, but I figured the Debian forum might be a better bet for a question about using apt-get flags and CLI.

I would like to know how to use dpkg / apt-get with reference to manually clearing up dependencies.

Firstly, how do I get apt-get to install a local deb and resolve its dependencies?
On Fedora, I would have done:
Quote:
yum localinstall xyz.rpm
However, when I tried to install some local debs with dpkg, e.g. (for a i386 deb I was trying to install):
Quote:
dpkg -i --force-architecture localdeb.deb
I ran into a dependency problem, and there doesn't seem to be any such flag as "localinstall" for apt-get to allow me to do a similar operation to that of yum above.

Trying (the only thing I could think of):
Quote:
apt-get -f install localdeb.deb
results in:
Quote:
E: Couldn't find package localdeb.deb
What should I do?


Secondly, another question in regard to resolving dependencies. I was trying to compile a program, and one of the problems with ./configure for example was
Quote:
checking for xml2-config... no
...How would I use apt-get to find which .deb package I need to install in order to provide e.g. xml2-config?


Thanks

Last edited by 144419855310001; 06-10-2007 at 03:02 PM.
 
Old 06-11-2007, 05:15 AM   #2
baikonur
Member
 
Registered: Oct 2005
Location: germany
Distribution: debian
Posts: 255
Blog Entries: 5

Rep: Reputation: 30
first of all, you make life easier on yourself if you use aptitude, not apt-get.
Quote:
Originally Posted by Debian Reference
aptitude is now the preferred text front end for APT, the Advanced Package Tool. It remembers which packages you deliberately installed and which packages were pulled in through dependencies; the latter packages are automatically de-installed by aptitude when they are no longer needed by any deliberately installed packages.
dpkg can install local files right after you downloaded them to your Desktop (or wherever you put them) but it lacks automatic dependency resolution, as opposed to apt, so either install all the missing packages manually with dpkg or create your own repository to use with apt. I'd do the latter. Like this:

Quote:
Originally Posted by Debian Reference
# aptitude install dpkg-dev
# mkdir /usr/local/debian
# mv /some/where/package.deb /usr/local/debian
# dpkg-scanpackages /usr/local/debian /dev/null | \
gzip - > /usr/local/debian/Packages.gz
# echo "deb file:/usr/local/debian ./" >> /etc/apt/sources.list
Read more here:
http://www.debian.org/doc/manuals/re...ackage.en.html

hope this helps

Last edited by baikonur; 06-11-2007 at 07:15 AM.
 
Old 06-11-2007, 02:54 PM   #3
ErrorBound
Member
 
Registered: Apr 2006
Posts: 280

Rep: Reputation: 31
Quote:
Originally Posted by 144419855310001
...How would I use apt-get to find which .deb package I need to install in order to provide e.g. xml2-config?
If you have access to a browser it's easier just to use http://packages.ubuntu.com . Scroll down to "search the contents of packages" and put xml2-config in that. You will find that it is included in the package libxml2-dev
 
Old 06-11-2007, 05:48 PM   #4
144419855310001
Member
 
Registered: Apr 2006
Distribution: ubuntu 7.04
Posts: 219

Original Poster
Rep: Reputation: 30
Thanks guys, that's great.
 
Old 06-12-2007, 08:36 AM   #5
144419855310001
Member
 
Registered: Apr 2006
Distribution: ubuntu 7.04
Posts: 219

Original Poster
Rep: Reputation: 30
Hi

I have another question.

I have been trying to use aptitude to install a package. However, whenever I try to do so, aptitude keeps on trying to install different packages in order to fix some broken dependencies for a certain couple of completely different packages.

However, I want these two packages to remain broken (I'm using a compiled version of the missing dependency, instead of a .deb).

Although I like the fact that aptitude tries to fix broken dependencies generally, I would like to have it stop bothering me about the dependency for these particular 2 packages whenever I try to install something!

How can I do so?
Thanks
 
Old 06-12-2007, 08:40 AM   #6
nx5000
Senior Member
 
Registered: Sep 2005
Location: Out
Posts: 3,307

Rep: Reputation: 57
Quote:
Secondly, another question in regard to resolving dependencies. I was trying to compile a program, and one of the problems with ./configure for example was
Quote:
checking for xml2-config... no

...How would I use apt-get to find which .deb package I need to install in order to provide e.g. xml2-config?
If you need to compile a debian package:
Code:
apt-get build-dep <package>
apt-get source <package>
cd packageXXX
debian/rules binary

For getting dependencies of a .deb , there is an automatic tool but I can't find it..

otherwise, just do something like this
Code:
cd /tmp
ar x /path/to/debfile
gzip -d /tmp/xxx/Control  (can't remember exactly the name)
You will get a file containing the dependencies for the binary and for the source.
 
Old 06-12-2007, 08:49 AM   #7
nx5000
Senior Member
 
Registered: Sep 2005
Location: Out
Posts: 3,307

Rep: Reputation: 57
I think for your dependency, you could use this.

Dirty way:
Go in /var/cache/apt, modify the control file of the package to remove the unwanted dependencies.

Last edited by nx5000; 06-12-2007 at 08:52 AM.
 
Old 06-12-2007, 08:55 AM   #8
baikonur
Member
 
Registered: Oct 2005
Location: germany
Distribution: debian
Posts: 255
Blog Entries: 5

Rep: Reputation: 30
Quote:
Originally Posted by 144419855310001
Although I like the fact that aptitude tries to fix broken dependencies generally, I would like to have it stop bothering me about the dependency for these particular 2 packages whenever I try to install something!
Thanks
i would create deb packages of these two, install them via your local repository and if thats not enough, put a hold on them. (in aptitude's ncurses interface, with [=] )
 
Old 06-12-2007, 08:58 AM   #9
144419855310001
Member
 
Registered: Apr 2006
Distribution: ubuntu 7.04
Posts: 219

Original Poster
Rep: Reputation: 30
I'd rather not have to bother creating a .deb out of this program I've compiled in order to meet the dependency.

Surely there must be some configuration file I can alter in order to ignore the dependency problem of the 2 packages aptitude insists on trying to fix?
 
Old 06-12-2007, 09:07 AM   #10
nx5000
Senior Member
 
Registered: Sep 2005
Location: Out
Posts: 3,307

Rep: Reputation: 57
It's the "dirty way" in my previous post. Never tried it though..

Is it possible to put on hold an uninstall package? Hum..
Also in /etc/apt/preferences you could forbid the dependencies version.

Now you have 4 or 5 methods, choose
 
Old 06-12-2007, 10:20 AM   #11
baikonur
Member
 
Registered: Oct 2005
Location: germany
Distribution: debian
Posts: 255
Blog Entries: 5

Rep: Reputation: 30
Quote:
Is it possible to put on hold an uninstall package? Hum..
no, can't put hold on purged packages. (just tried, because i was curious myself )
manipulating the control file is probably justified in this situation... i wouldn't make a habit of it, though


btw,
Code:
man -k dependenc
yielded
Code:
dpkg-checkbuilddeps -B [control file]
as a tool to find the deps.

Last edited by baikonur; 06-12-2007 at 10:29 AM.
 
Old 06-12-2007, 11:08 AM   #12
144419855310001
Member
 
Registered: Apr 2006
Distribution: ubuntu 7.04
Posts: 219

Original Poster
Rep: Reputation: 30
Not being too familiar with debian, equivs looked the most understandable, and it seems to have fixed the problem very nicely.

Thank you!

( for anyone else reading this, the howto is here:
http://www.debian.org/doc/manuals/ap...elpers.en.html )
 
  


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 i need help fixing broken dependencies turkenator02 SUSE / openSUSE 2 05-11-2006 04:36 AM
Fixing XP rml54321 LinuxQuestions.org Member Success Stories 2 09-16-2004 10:54 AM
I recieve a failed dependencies error, but I have all required dependencies Laptop2250 Linux - Software 15 02-03-2004 07:58 PM
Clean distro GREAT but please... how do I manually find out dependencies? Wim_Woittiez Slackware 5 12-01-2003 02:56 AM
Fixing ISOs Proud Linux - Software 25 04-17-2003 01:47 PM

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

All times are GMT -5. The time now is 03:05 PM.

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