LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Debian (https://www.linuxquestions.org/questions/debian-26/)
-   -   Can 'dpkg -i' resolve dependency issue automatically? (https://www.linuxquestions.org/questions/debian-26/can-dpkg-i-resolve-dependency-issue-automatically-472911/)

Akhran 08-11-2006 06:01 AM

Can 'dpkg -i' resolve dependency issue automatically?
 
While installing somepackage.deb with

dpkg -i somepackage.deb,

some required files are missing.

Is there an argument that can enable dpkg to download the required files automatically from the Internet?

Otherwise, can aptitude be used to install a local deb package and automatically download the required dependencies?

Thanks !

tets 08-11-2006 07:36 AM

Maybe there is an argument - I'm not guru, I do not know, but I think it is not.
Look at the "auto-apt" command.

Tets :-)

mikieboy 08-11-2006 07:47 AM

I'm not quite clear what you are trying to do. If the package is listed in the Debian repositories then certainly aptitude will resolve all dependancies, it's what it's good at. If you are trying to install a package from elsewhere (and I don't know what you mean by "local deb package") then you will need to look up dependancies for yourself by visiting the package maintainers website and installing those dependancies first. AFAIK dpkg doesn't resolve dependancies. Hope this helps.

baldy1324 08-11-2006 10:46 AM

dont think so
 
sorry i havent really looked over the dpkg arguments but as far as i know apt was built to take care of dependencies but dpkg will tell you if it needs dependencies to install and work. so if it says you dont have the dependencies go and apt-get them.
hope that will help!

Akhran 08-11-2006 05:13 PM

For "local deb package", I was referring to a deb package that is on a local harddisk. Since dpkg doesn't resolve dependencies automatically, can aptitude install a deb package (eg. Webmin-1.290.deb) and yet able to download the required dependencies(perl in this case) from the Internet when necessary?

Sorry for the confusion and thanks !

Quote:

Originally Posted by mikieboy
I'm not quite clear what you are trying to do. If the package is listed in the Debian repositories then certainly aptitude will resolve all dependancies, it's what it's good at. If you are trying to install a package from elsewhere (and I don't know what you mean by "local deb package") then you will need to look up dependancies for yourself by visiting the package maintainers website and installing those dependancies first. AFAIK dpkg doesn't resolve dependancies. Hope this helps.


kushalkoolwal 08-11-2006 07:21 PM

Quote:

Originally Posted by Akhran
For "local deb package", I was referring to a deb package that is on a local harddisk. Since dpkg doesn't resolve dependencies automatically, can aptitude install a deb package (eg. Webmin-1.290.deb) and yet able to download the required dependencies(perl in this case) from the Internet when necessary?

Sorry for the confusion and thanks !


dpkg -i - Does not resolve dependencies. Although it will tell you which ones are missing but it won't download.

apt-get, aptitutde - will do both for you i.e. resolve dependencies and fetch them from an active internet connection.

Hope this helps.

binary_y2k2 08-11-2006 07:38 PM

In my experience, if you try to install a deb but it has dependences, "apt-get -f install" will fetch the dependences for you and install them then configure the local deb package

kushalkoolwal 08-11-2006 07:46 PM

Quote:

Originally Posted by binary_y2k2
In my experience, if you try to install a deb but it has dependences, "apt-get -f install" will fetch the dependences for you and install them then configure the local deb package


In a way you are right, what I guess what Akhran meant was if it downloads automatically or not.

The user will have to manually give the command apt-get -f install once dpkg gave error because of missing dependencies.

PingFloyd 08-11-2006 11:11 PM

This url may be helpful.

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

You probably especially want to read the section "2.2 How to use APT locally".

Let me know how it goes, because you bring up and interesting question. Seems like it could be very handy having dependencies taken care of in an automated "Debian" fashion in certain situations.

binary_y2k2 08-11-2006 11:20 PM

Well dpkg is a simple package installer apt/aptitude/dselect are an intelligent front end to dpkg that resolve dependences for you. In short dpkg won't resolve dependences for you, this is why apt dselect and aptitude ware developed. Together apt and dpkg will cover most situations.

browny_amiga 01-02-2010 03:13 AM

Quote:

Originally Posted by binary_y2k2 (Post 2376324)
Well dpkg is a simple package installer apt/aptitude/dselect are an intelligent front end to dpkg that resolve dependences for you. In short dpkg won't resolve dependences for you, this is why apt dselect and aptitude ware developed. Together apt and dpkg will cover most situations.

Yeah, most situations, but not this one. Not the one that the poster asked. It is important in my opinion to always ANSWER the question, the precise questions. And to answer it, directly:
dpkg cannot do what you want you need alone.
apt-get cannot do what you need alone.
You need them both. This problem has existed a long time and still is not fixed. We need a little more intelligence in apt-get and aptitude.
New ideas are necessary.
Looks like I have to do something for myself, so I don't have to find in 5 years that, nothing moved and that apt-get still covers "most situations", but that you constantly run into the problems that you need to install a single package and get stuck and have to kick start it by hand.
How about dpkg offering you "do you want me to try install dependencies via apt-get?"
(or make this choice possible with a --intelligent" switch? (so it does not break all the old scripts that rely on the non interactive dpkg.

Markus

the trooper 01-02-2010 06:06 AM

Quote:

How about dpkg offering you "do you want me to try install dependencies via apt-get?"
You could try gdebi:

Quote:

ade@Pc1:~$ aptitude show gdebi
Package: gdebi
State: not installed
Version: 0.5.9debian2
Priority: optional
Section: admin
Maintainer: Gustavo Franco <stratus@debian.org>
Uncompressed Size: 156k
Depends: python (< 2.6), python (>= 2.5), python-central (>= 0.6.11), gdebi-core (= 0.5.9debian2),
python-gtk2 (>= 2.6.3-2), python-vte (>= 1:0.11.15-4), gksu (>= 2.0.0-1ubuntu3),
gnome-icon-theme (>= 2.14.0-1)
Recommends: libgnome2-perl
Description: Simple tool to install deb files
gdebi lets you install local deb packages resolving and installing its dependencies. apt does the same,
but only for remote (http, ftp) located packages.

This package contains the graphical user interface.

http://packages.debian.org/lenny/gdebi

milomak 01-02-2010 09:48 AM

i too was going to suggest gdebi

browny_amiga 01-04-2010 09:54 PM

[SOLUTION] gdebi installs dependencies of local packages, dpkg does not
 
Pretty cool there!

Yes, Gdebi does solve the case. It does what dkpk cannot do. I have known gdebi for some time, but always thought that it was just a graphical frontend for dpkg.
(the one that is gdebi-gtk)
And they both solve the case.

So, great!


All times are GMT -5. The time now is 02:15 PM.