LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (http://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Possible to use aptitude to install a .deb not in a repository? (http://www.linuxquestions.org/questions/linux-newbie-8/possible-to-use-aptitude-to-install-a-deb-not-in-a-repository-752706/)

catkin 09-04-2009 12:39 PM

Possible to use aptitude to install a .deb not in a repository?
 
Hello :)

I want to be consistent about using aptitude (rather than a mix of apt-get, dpkg and aptitude) and want to install a package that is not in a Repository. The aptitude man page doesn't seem to cover this situation.

Previously I have installed this type of .deb using
Code:

dpkg -i <path to .deb>
What should I do for best? Put the .deb in a local Repository? Use dpkg -i anyway?

In case it makes any difference, the .deb in question is OpenOffice.org 3.1.1, currently in OOo_3.1.1_LinuxIntel_install_wJRE_pl.tar.gz and the OS is ubuntu 8.04.3 (but I'm pre-positioning to move away from ubuntu and so trying to use non-ubuntu packages wherever possible).

Or am I wrong to have been convinced by "aptitude is the successor to apt-get, dpkg etc and is the preferred solution that all right-thinking people will use".

Best

Charles

TITiAN 09-04-2009 03:04 PM

Hi

two things I suggest:

1) I don't think there is anything wrong with using dpkg. As far as I know, aptitude and apt-get use that tool themselves. Those three commands are compatible to each other, anyway. I never heard about anything like aptitude being the successor of apt-get...

2) Why "move away from Ubuntu"? Using source packages will make your installation only harder to maintain and upgrade. If you don't like the Ubuntu packages, you could use debian packages (using debian directly would most likely be a better idea in that case, though).

neonsignal 09-04-2009 03:26 PM

From the package tools documentation:

Quote:

Note that aptitude is the preferred program for package management from console both for package installations and package or system upgrades.
So there is some support for the idea that aptitude is a 'successor'. However, the original intention was that aptitude would be a front end for apt-get.

But aptitute/apt-get do not succeed dpkg; dpkg is just a lower-level part of the installation. Whereas the first manages the big picture installation (especially issues like dependencies), the latter does the actual install.

So there is nothing wrong with using dpkg directly, and the main disadvantages are to do with unmet dependencies and trying to remember the name when you want to remove the package later!

If the main issue is just to resolve dependencies, then you can simply run apt-get/aptitude on the same package after using dpkg:

Code:

dpkg -i package-file.deb
aptitude install package-name

The ideal combination method is to add a local repository of deb files to the package database. The basic method is to create your own repository at some location:

Code:

mkdir /location/debs
cp package-file.deb /location/debs
dpkg-scanpackages /location/debs /dev/null | gzip > /location/debs/Packages.gz

And then add them to your apt sources:

Code:

deb file:/location debs/
Incidentally, if the main reason for installing deb files directly is to get newer versions, you could look at using backports versions that have been built specifically for your Ubuntu distribution.

catkin 09-04-2009 04:53 PM

Thanks TITiAN and neonsignal :)

Foolishly I started three topics by this thread -- about aptitude/apt-get/dpkg, about using non-ubuntu packages on ubuntu and about pre-positioning for a move from ubuntu.

Quote:

I don't think there is anything wrong with using dpkg. As far as I know, aptitude and apt-get use that tool themselves. Those three commands are compatible to each other, anyway.
I have read (on LQ) that aptitude and apt-get keep different records so it is not a good idea to use both. I don't know the details.

From the replies given in this thread, I am re-assured that it is certainly worth trying apt-get -i on OOo 3.1.1 and that dire problems from not using aptitude are unlikely. On my own responsibility, of course.

Quote:

The ideal combination method is to add a local repository of deb files to the package database.
I'm wary of putting OOo in my local ubuntu repository because the set of ubuntu repositories has dependency information about ubuntu packages. The OOo deb may have dependency information but, if it does, it will be generic and not specific to ubuntu. Is my understanding OK or do all .deb packages inter-operate regards dependencies?

In the case of OOo, threads about the ubuntu OOo packages on www.oooforum.org often attract advice to install the Sun package and that advice often solves problems. I have been using Sun's OOo 3.1.0 for a few months and do not miss any ubuntification.

Quote:

the main disadvantages are to do with unmet dependencies and trying to remember the name when you want to remove the package later!
OOo is designed to be more self-contained than most packages so I'm not too worried about dependencies. I keep extensive records and well-stuctured directories so am not worried about forgetting the package name.

I have installed a few generic .debs, some because there was no ubuntu version, some to work around bugs and some because I wanted new features. In the case of Xfce4 4.6.1 it would have been "boldly going" to do so; I chickened out and used a backport.

Quote:

Why "move away from Ubuntu"? Using source packages will make your installation only harder to maintain and upgrade. If you don't like the Ubuntu packages, you could use debian packages (using debian directly would most likely be a better idea in that case, though).
I chose ubuntu for what were good reasons at the time (the only Linux in use locally) but ubuntu's aims are not my desires, ubuntu's target user type is not mine, and we are not well suited. Debian is the distro I'm thinking of changing to but no need to rush the decision this time (when I chose ubuntu, my Windows XP computer had been struck by lightening and I'd vowed it would be my last Windows computer!).

Best

Charles

TITiAN 09-04-2009 06:20 PM

When it comes to the question "which distro to use?" my experience was that trying out different ones helped me most. This is the most common and at the same time most difficult question for a Linux newbie ever (people have different attitudes, style, know-how ... you get the idea).

A good site that is dedicated to this question is http://www.distrowatch.com

Since you seem to want to deal with technical stuff, Ubuntu might not be suitable because everything (or almost) is automated. On the other hand, it might be good because you can see how useful Linux can be.

Have a lot of fun with Free Software!

catkin 09-05-2009 01:39 PM

Quote:

Originally Posted by TITiAN (Post 3670291)
When it comes to the question "which distro to use?" my experience was that trying out different ones helped me most. This is the most common and at the same time most difficult question for a Linux newbie ever (people have different attitudes, style, know-how ... you get the idea).

A good site that is dedicated to this question is http://www.distrowatch.com

Since you seem to want to deal with technical stuff, Ubuntu might not be suitable because everything (or almost) is automated. On the other hand, it might be good because you can see how useful Linux can be.

Have a lot of fun with Free Software!

Thanks TITiAN :)

Linux distros are non-trivial so assessing one is a major work (that's where users' experience is so much more valuable than magazine articles, because the users have real-world, long-time experience). Recognizing that it takes a least 2 months intensive use to assess a distro, I think it will be less work overall to identify the design aims of distros before trying by usage.

I used an on-line "which distro for you?" and it identified Debian but may have put too much emphasis on high availability of pre-packaged applications; sure, that is convenient, but it is not a very significant factor for me.

ubuntu's design aim of making things easy for the user actually makes things harder for me; I want to dig behind the GUI gloss, find how things really work and set them up the way I want. ubuntu (and especially Gnome and probably KDE but I haven't been there) is complex behind the intended user interface, little documented and hard to reverse-engineer. It is not meant to be user-land! On top of that, complex systems are hard to debug so tend to have more bugs. I like systems that "just work". Some basic functionality is broken in ubuntu, even in the LTS version I chose hoping it would "just work", for example No (supported) boot logging system and DVD read failures.

I don't need convincing that Linux is useful! I was very excited bout the concept on first hearing about it and was just waiting for the essential applications to be "good enough" before starting to use it. 14 months after the change I am even more convinced (but it would be nice to have a fully-featured cell-phone integration solution to replace nokia's PC SUite so I could drop Windows completely).

I looked at http://www.distrowatch.com but did not find the hoped-for comparison table saying which "different attitudes, style, know-how etc." each was designed for.

Slackware looks interesting (source of information: wikipedia) but I'll not write more here, maybe in LQ debian-is-so-coool/.

Best

Charles

rtclay 06-01-2012 02:44 PM

For anyone trying to follow the local repository instructions above, I was able to complete them only after installing the build-essential package.


All times are GMT -5. The time now is 12:04 AM.