Option to call apt install package to local directory

classic Classic list List threaded Threaded
9 messages Options
hce
Reply | Threaded
Open this post in threaded view
|

Option to call apt install package to local directory

hce
Hi,

What is the command to make "apt-get install package" to install the
package to my local directory rather than /usr?

Thank you.

Kind Regards,

Jim


--
To UNSUBSCRIBE, email to [hidden email]
with a subject of "unsubscribe". Trouble? Contact [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Option to call apt install package to local directory

andreimpopescu
On Sat, May 10, 2008 at 09:00:33PM +1000, hce wrote:
> Hi,
>
> What is the command to make "apt-get install package" to install the
> package to my local directory rather than /usr?

I don't know of any such option for dpkg (which is what apt uses to
actually install the packages), but maybe you should explain what your
real goal is. The Filesystem Hierarchy Standard (see 'man hier') was
created for a purpose.

Regards,
Andrei
--
If you can't explain it simply, you don't understand it well enough.
(Albert Einstein)

signature.asc (196 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Option to call apt install package to local directory

michf
On Sat, 10 May 2008 14:27:15 +0300
Andrei Popescu <[hidden email]> wrote:

> On Sat, May 10, 2008 at 09:00:33PM +1000, hce wrote:
> > Hi,
> >
> > What is the command to make "apt-get install package" to install the
> > package to my local directory rather than /usr?
>
> I don't know of any such option for dpkg (which is what apt uses to
> actually install the packages), but maybe you should explain what your
> real goal is. The Filesystem Hierarchy Standard (see 'man hier') was
> created for a purpose.
>
> Regards,
> Andrei

I'm also not aware of such an option. Depending on the package you may be able
to download only using apt-get -d install ... and then open it yourself.

To open the package you have

ar x <package>
and then there should be a file something like data.tar.gz that contains the
actual installation tree


--
To UNSUBSCRIBE, email to [hidden email]
with a subject of "unsubscribe". Trouble? Contact [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Option to call apt install package to local directory

Mumia W..-4
In reply to this post by hce
On 05/10/2008 06:00 AM, hce wrote:

> Hi,
>
> What is the command to make "apt-get install package" to install the
> package to my local directory rather than /usr?
>
> Thank you.
>
> Kind Regards,
>
> Jim
>
>

There is no single command to do this. You would use several simple
commands instead.

First use this to get the URL:
apt-get --print-uris package

Then select the URL and use wget to download it:
wget "URL"

Then use dpkg to extract the package contents:
dpkg -X packagefile


HTH


--
To UNSUBSCRIBE, email to [hidden email]
with a subject of "unsubscribe". Trouble? Contact [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Option to call apt install package to local directory

Kevin Mark-6
In reply to this post by andreimpopescu
On Sat, May 10, 2008 at 02:27:15PM +0300, Andrei Popescu wrote:

> On Sat, May 10, 2008 at 09:00:33PM +1000, hce wrote:
> > Hi,
> >
> > What is the command to make "apt-get install package" to install the
> > package to my local directory rather than /usr?
>
> I don't know of any such option for dpkg (which is what apt uses to
> actually install the packages), but maybe you should explain what your
> real goal is. The Filesystem Hierarchy Standard (see 'man hier') was
> created for a purpose.
>
There are 2 things related to the OP request:
A)download the DEB to an alternative location
B)install the DEB to an alternative location
A is possible. B has limitations like the FHS.
-K



--
|  .''`.  == Debian GNU/Linux == |       my web site:           |
| : :' :      The  Universal     |mysite.verizon.net/kevin.mark/|
| `. `'      Operating System    | go to counter.li.org and     |
|   `-    http://www.debian.org/ |    be counted! #238656       |
|  my keyserver: subkeys.pgp.net |     my NPO: cfsg.org         |
|join the new debian-community.org to help Debian!              |
|_______  Unless I ask to be CCd, assume I am subscribed _______|


--
To UNSUBSCRIBE, email to [hidden email]
with a subject of "unsubscribe". Trouble? Contact [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Option to call apt install package to local directory

andreimpopescu
In reply to this post by Mumia W..-4
On Sat, May 10, 2008 at 10:42:27AM -0500, Mumia W.. wrote:

> There is no single command to do this. You would use several simple
> commands instead.
>
> First use this to get the URL:
> apt-get --print-uris package
>
> Then select the URL and use wget to download it:
> wget "URL"

What's wrong with 'aptitude download'? There is also a -d option for
apt-get but I don't know where the package gets saved, the man page
doesn't specify (aptitude saves it to the current dir).

Regards,
Andrei
--
If you can't explain it simply, you don't understand it well enough.
(Albert Einstein)

signature.asc (196 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Option to call apt install package to local directory

Mumia W..-4
On 05/10/2008 03:28 PM, Andrei Popescu wrote:

> On Sat, May 10, 2008 at 10:42:27AM -0500, Mumia W.. wrote:
>
>> There is no single command to do this. You would use several simple
>> commands instead.
>>
>> First use this to get the URL:
>> apt-get --print-uris package
>>
>> Then select the URL and use wget to download it:
>> wget "URL"
>
> What's wrong with 'aptitude download'? There is also a -d option for
> apt-get but I don't know where the package gets saved, the man page
> doesn't specify (aptitude saves it to the current dir).
>
> Regards,
> Andrei

There's nothing wrong with 'aptitude download', but there was something
wrong with me: I didn't know about that. Sorry.

The "-d" option to apt-get downloads to /var/cache/apt/archives

So you can download to that directory and just copy the .deb to your
current directory.


--
To UNSUBSCRIBE, email to [hidden email]
with a subject of "unsubscribe". Trouble? Contact [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Option to call apt install package to local directory

michf
In reply to this post by Kevin Mark-6
On Sat, 10 May 2008 15:35:19 -0400
Kevin Mark <[hidden email]> wrote:

> On Sat, May 10, 2008 at 02:27:15PM +0300, Andrei Popescu wrote:
> > On Sat, May 10, 2008 at 09:00:33PM +1000, hce wrote:
> > > Hi,
> > >
> > > What is the command to make "apt-get install package" to install the
> > > package to my local directory rather than /usr?
> >
> > I don't know of any such option for dpkg (which is what apt uses to
> > actually install the packages), but maybe you should explain what your
> > real goal is. The Filesystem Hierarchy Standard (see 'man hier') was
> > created for a purpose.
> >
> There are 2 things related to the OP request:
> A)download the DEB to an alternative location
> B)install the DEB to an alternative location
> A is possible. B has limitations like the FHS.
> -K
>
>
>

Not sure how difficult it is but it may be possible to force installation using
chroot (the program may need that to find it's files anyway)


--
To UNSUBSCRIBE, email to [hidden email]
with a subject of "unsubscribe". Trouble? Contact [hidden email]

hce
Reply | Threaded
Open this post in threaded view
|

Re: Option to call apt install package to local directory

hce
In reply to this post by Kevin Mark-6
On 5/11/08, Kevin Mark <[hidden email]> wrote:

> On Sat, May 10, 2008 at 02:27:15PM +0300, Andrei Popescu wrote:
>  > On Sat, May 10, 2008 at 09:00:33PM +1000, hce wrote:
>  > > Hi,
>  > >
>  > > What is the command to make "apt-get install package" to install the
>  > > package to my local directory rather than /usr?
>  >
>  > I don't know of any such option for dpkg (which is what apt uses to
>  > actually install the packages), but maybe you should explain what your
>  > real goal is. The Filesystem Hierarchy Standard (see 'man hier') was
>  > created for a purpose.
>  >
>
> There are 2 things related to the OP request:
>  A)download the DEB to an alternative location
>  B)install the DEB to an alternative location
>  A is possible. B has limitations like the FHS.
>  -K

Thanks for all of your suggestions, I'll try different options. I was
searching mysql C client sample code and installing mysql development
pacakge. My root partition has limited space, I have to install the
development package to my local user partition.

Kind Regards.

Jim


--
To UNSUBSCRIBE, email to [hidden email]
with a subject of "unsubscribe". Trouble? Contact [hidden email]