LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 11-26-2005, 03:14 PM   #1
Frunktz
Member
 
Registered: Nov 2005
Distribution: Debian, Slackware
Posts: 31

Rep: Reputation: 15
Install with apt-get in other path


Hi @ all.
I have a little question. How I can install a program or source (apt-get install, apt-build, dpkg -i) in a specific path?
For example
apt-get install package -path=/mydir/myprog

Thanks a lot
 
Old 11-26-2005, 04:10 PM   #2
michapma
Member
 
Registered: Oct 2003
Location: Zürich
Distribution: Debian
Posts: 537

Rep: Reputation: 39
Hi,

I don't recall ever reading anything about it, but that doesn't mean you can't do it. That said, I'm not sure why you'd want to, although I'm sure you have your reasons.
 
Old 11-27-2005, 03:05 AM   #3
Frunktz
Member
 
Registered: Nov 2005
Distribution: Debian, Slackware
Posts: 31

Original Poster
Rep: Reputation: 15
Eheh.
I want to do that because I would to install some package in a particular directory to chrooted.
Before using Debian, I have used Slackware.
With this I reach this object compiling the source with

./configure
make
make install DESTDIR=/mydir

I can do this also with Debian, but I want know if there's a way to make that with apt-get
 
Old 11-27-2005, 12:16 PM   #4
Lokathor
Member
 
Registered: Oct 2005
Location: Boise, ID
Distribution: Debian testing
Posts: 99

Rep: Reputation: 15
you could use the -d option to get the packages, and then dpkg has an option
"--root=<directory> Install on alternative system rooted elsewhere"
which might be what you're looking for.
 
Old 11-27-2005, 12:58 PM   #5
Frunktz
Member
 
Registered: Nov 2005
Distribution: Debian, Slackware
Posts: 31

Original Poster
Rep: Reputation: 15
Wow great!
It's perfect!!! Thanks a lot!
If I can..I want to ask another thing..
How I can remove only a packet (apt or dpkg) without remove its dependence?
For example if I try
apt-get remove freetype2-dev, I must remove 26 other packet (libalsa, libarts, libkdebase, ecc)..
Can remove only a package and reinstall it after?
 
Old 11-27-2005, 01:33 PM   #6
Lokathor
Member
 
Registered: Oct 2005
Location: Boise, ID
Distribution: Debian testing
Posts: 99

Rep: Reputation: 15
A much less than perfect way to do it would be to use aptitide. Do a search for the package you want to remove (/ then type the package name), remove it (-), and then scroll up and down your "installed packages" list. All the dependencies should be listed in purple and marked for removal. Just add them back (+) and when you're done have it make the changes (g) and you should be set.
 
Old 11-27-2005, 01:38 PM   #7
Frunktz
Member
 
Registered: Nov 2005
Distribution: Debian, Slackware
Posts: 31

Original Poster
Rep: Reputation: 15
I try in this way, but when I try to readd them, the package libfreetype2-dev is REselect again.
 
Old 11-27-2005, 01:48 PM   #8
Lokathor
Member
 
Registered: Oct 2005
Location: Boise, ID
Distribution: Debian testing
Posts: 99

Rep: Reputation: 15
hmm..

well, did you try to remove just the one package you want gone with dpkg? I don't think it'll take away any more than just the packages you tell it to remove. dpkg -r|--remove
 
Old 11-27-2005, 02:06 PM   #9
Frunktz
Member
 
Registered: Nov 2005
Distribution: Debian, Slackware
Posts: 31

Original Poster
Rep: Reputation: 15
dpkg -r freetype2-dev ENTER
Some warning..
Error: cannot remove that package, dependency conflict..
 
Old 11-29-2005, 04:22 AM   #10
Frunktz
Member
 
Registered: Nov 2005
Distribution: Debian, Slackware
Posts: 31

Original Poster
Rep: Reputation: 15
Ok. Resolved

dpkg -r --force depends package
 
Old 11-30-2005, 11:47 PM   #11
arrenlex
Member
 
Registered: Jul 2005
Distribution: Debian Etch
Posts: 48

Rep: Reputation: 17
Quote:
Can remove only a package and reinstall it after?
What's wrong with just "apt-get install --reinstall <package>"?
 
Old 12-01-2005, 03:27 AM   #12
Frunktz
Member
 
Registered: Nov 2005
Distribution: Debian, Slackware
Posts: 31

Original Poster
Rep: Reputation: 15
Because I need to install a package recompiled from the source downloaded with apt-get source. If I try to install new .deb I have some errors of overwriting..
 
Old 12-02-2005, 07:41 AM   #13
michapma
Member
 
Registered: Oct 2003
Location: Zürich
Distribution: Debian
Posts: 537

Rep: Reputation: 39
Quote:
Originally posted by Lokathor
you could use the -d option to get the packages, and then dpkg has an option
"--root=<directory> Install on alternative system rooted elsewhere"
which might be what you're looking for.
Learn something every day. Neat thread.
 
Old 12-02-2005, 08:08 AM   #14
Frunktz
Member
 
Registered: Nov 2005
Distribution: Debian, Slackware
Posts: 31

Original Poster
Rep: Reputation: 15
Yep!
 
Old 02-16-2006, 06:18 AM   #15
Frunktz
Member
 
Registered: Nov 2005
Distribution: Debian, Slackware
Posts: 31

Original Poster
Rep: Reputation: 15
Uhm, I try to use that funny flah --root=<dir> to install a deb package in another directory like /chroot, but I cannot install that.
I read that --root option change the installdir of the package and the directory where are dpkg files (from /var/lib/dpkg to /<directory>/var/lib/dpkg). I try to recreate that structure under <directory> but I still cannot install the package. I also try to change only the flag --instdir, but always error...
Anyway to install a package in a particular path?

Thanks again
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Two questions: $PATH and some apt-get help. Lokathor Debian 7 10-28-2005 12:21 AM
apt-get j2sdk1.4, now where is my path? lefty.crupps DamnSmallLinux 4 10-18-2005 01:19 PM
apt-get install not working / apt-get update is ok remy215 Debian 2 10-01-2005 07:02 PM
knoppix 3.4 and no apt-setup how to fix info install apt-file + base-config maximalred Debian 0 10-16-2004 06:36 PM
Accidentally deleted APT. How to re-install apt? Gruzzen Debian 2 11-14-2003 05:33 PM

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

All times are GMT -5. The time now is 11: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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration