LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > General
User Name
Password
General This forum is for non-technical general discussion which can include both Linux and non-Linux topics. Have fun!

Notices


Reply
  Search this Thread
Old 08-01-2003, 08:15 PM   #1
crash89
Member
 
Registered: Jul 2001
Location: Northern VA
Distribution: SuSE 9.0
Posts: 61

Rep: Reputation: 15
Installing a package on Debian.


Feeling like a complete noob here. I am used to an RPM distro and just went to Debian. Can anyone tell me how to install a .deb package? Thanks!
 
Old 08-01-2003, 08:30 PM   #2
irish_rover
Member
 
Registered: Sep 2002
Location: IN, USA
Distribution: Debian, Endian FW
Posts: 368

Rep: Reputation: 30
Here is a link to the apt howto.

Basically in Debian all you need to do is know what you want and you can install it with...

apt-get install packagename

Or if you don't know

apt-cache search somepackage

http://www.debian.org/doc/manuals/ap....html#contents
 
Old 08-01-2003, 08:36 PM   #3
crash89
Member
 
Registered: Jul 2001
Location: Northern VA
Distribution: SuSE 9.0
Posts: 61

Original Poster
Rep: Reputation: 15
I already downloaded the package. I thought apt-get was to download and install... Like I said I feel like a noob. Debian is very different from RH or Mandrake.
 
Old 08-02-2003, 10:41 AM   #4
irish_rover
Member
 
Registered: Sep 2002
Location: IN, USA
Distribution: Debian, Endian FW
Posts: 368

Rep: Reputation: 30
apt-get does download and install packages. Do you have a package that you downloaded that you just want to install? You can also install local packages with dpkg.
 
Old 08-02-2003, 11:05 AM   #5
crash89
Member
 
Registered: Jul 2001
Location: Northern VA
Distribution: SuSE 9.0
Posts: 61

Original Poster
Rep: Reputation: 15
Yes. I downloaded it yesterday and realized I know next to nothing about Debian....
 
Old 08-02-2003, 11:12 AM   #6
irish_rover
Member
 
Registered: Sep 2002
Location: IN, USA
Distribution: Debian, Endian FW
Posts: 368

Rep: Reputation: 30
I almost always just use apt-get. You've done the hard part, installation. Now just get used to using apt-get and you'll be all set.

Basically if you know what the basic name of the package is that you want you can search to get the exact...
apt-cache search somepackage

Then if you want specific info on what that package is you can do...
apt-cache show somepackage

If that info matches what you want then you can install with...
apt-get install somepackage

I rarely install anything any other way.
 
Old 08-02-2003, 02:30 PM   #7
Strike
Member
 
Registered: Jun 2001
Location: Houston, TX, USA
Distribution: Debian
Posts: 569

Rep: Reputation: 31
Obviously, using apt is the preferred way of installing things, but if you grab a .deb manually and want to install it, you have a few choices of how you want to do it. One is good for quick things but can be a bit tougher to troubleshoot, and one takes longer to set up but it's a good general solution for installing manually downloaded .deb files.

First option - dpkg -i
That's how you used to have to install .deb files (back in like ... '95 or so, before apt). dpkg -i foo.deb and go. The major problem with this is that there is no dependency resolution done. There is still dependency checking done, of course, but it won't be able to go and get those dependencies for you. You'll have to get those via apt before you can successfully install the deb. This is the quick fix.

Second option - set up your own local apt repository
This is a bit advanced, but it's not too tough to do, so I thought I'd throw it in here. If you're someone who will (for some odd reason) be downloading a lot of .deb files manually and wanting to install them via apt (for the dependency resolution), this is probably the way to go. Basically, you are setting up your own apt source on your local filesystem and then apt-getting it from yourself.

First, decide where you want to put it. I recommend either ~/deb or /usr/local/deb (perhaps debian instead of deb for either). Once that directory is created, toss whatever .deb files that you want to install in there. Now, you need to grab the tools for setting one up. They are in the dpkg-dev package, so grab that from apt. Next, you have to run one simple command which will create/update the apt reopsitory to reflect what .deb files you have in there. First, change to the directory one level above your deb directory, and run this command:

dpkg-scanpackages deb /dev/null | gzip > deb/Packages.gz

You'll probably get a warning about "Packages in archive but missing from override file", but ignore that. You'll also see how many packages it put in the Packages file as well.

The last step is to simply add your new apt source to the sources.list and then update and install via apt. For the /usr/local/deb directory, the apt line would look like this:

deb file:/usr/local/deb /

Note the space between "deb" and the last "/", and don't leave it out. It's important. Once that's in your sources.list, simply apt-get update and you should be able to apt-get install anything you want that's in that directory, and it will do dependency resolution for you.
 
Old 08-02-2003, 02:36 PM   #8
jvds
Member
 
Registered: Jul 2003
Posts: 88

Rep: Reputation: 15
One thing that might be worth mentioning is that if apt doesn't have it but you have an rpm use the program alien. It can make and RPM into a deb

HTH

Rus
 
Old 08-02-2003, 04:20 PM   #9
Strike
Member
 
Registered: Jun 2001
Location: Houston, TX, USA
Distribution: Debian
Posts: 569

Rep: Reputation: 31
Ack, no, don't use alien. Even the creator of alien (Joey Hess) would tell you not to use alien. The only reason alien exists is for LSB compliance. In cases where there are RPMs and source available, but no debs, use the source and put it in /usr/local (with ./configure --prefix=/usr/local; make; make install). Only use alien if you absolutely have no other choice (i.e., no source available, only RPMs).
 
Old 08-03-2003, 01:48 PM   #10
2damncommon
Senior Member
 
Registered: Feb 2003
Location: Calif, USA
Distribution: PCLINUXOS
Posts: 2,918

Rep: Reputation: 103Reputation: 103
I am glad to see you hanging around here, Strike.
Your posts are excellent, as always. (And now I will refrain from saying that continually.)

Two thumbs up....
 
Old 08-03-2003, 08:02 PM   #11
crash89
Member
 
Registered: Jul 2001
Location: Northern VA
Distribution: SuSE 9.0
Posts: 61

Original Poster
Rep: Reputation: 15
Many thanks! Choice in OS is good. Can be a bit confusing at times. Sometimes, I think there are too many ways to do things. I think Debian may have a convert.
 
  


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
debian package mithereal Debian 7 09-12-2005 03:17 AM
Installing debian package in slackware TomalakBORG Linux - Software 1 06-16-2005 07:56 PM
Installing GCC from The Online Debian Package Archive Erik_the_Red Ubuntu 1 05-30-2005 10:11 PM
Debian: Problem installing 'Source RPM package' driver for winmodem Steerpike_jhb Linux - Newbie 8 03-17-2005 03:33 AM
installing an unstable package from debian's online package archive ganninu Debian 13 11-07-2003 03:00 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > General

All times are GMT -5. The time now is 04:09 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