Results 1 to 3 of 3

Thread: How do I change the installation directory for apt-get? How do I use dpkg to install?

Hybrid View

  1. #1
    Join Date
    Sep 2007
    Beans
    180

    Question How do I change the installation directory for apt-get? How do I use dpkg to install?

    Hi

    I'm building my linux distribution, and I have 195 'items' to install. 65 of them are Debian packages.

    I would like all 65 of my .deb to be installed into a certain directory.

    When running this command;
    Code:
    dpkg -i --instdir=/tools/debian hexedit_1.2.12-3_i386.deb
    I get the following error;

    Code:
    root@panarchy:/home/ubuntu/Desktop/Debian Packages# dpkg -i --instdir=/tools/debian hexedit_1.2.12-3_i386.deb
    (Reading database ... 83164 files and directories currently installed.)
    Preparing to replace hexedit 1.2.12-3 (using hexedit_1.2.12-3_i386.deb) ...
    Unpacking replacement hexedit ...
    dpkg (subprocess): unable to execute old post-removal script: No such file or directory
    dpkg: warning - old post-removal script returned error exit status 2
    dpkg - trying script from the new package instead ...
    dpkg (subprocess): unable to execute new post-removal script: No such file or directory
    dpkg: error processing hexedit_1.2.12-3_i386.deb (--install):
     subprocess new post-removal script returned error exit status 2
    dpkg (subprocess): unable to execute new post-removal script: No such file or directory
    dpkg: error while cleaning up:
     subprocess post-removal script returned error exit status 2
    Errors were encountered while processing:
     hexedit_1.2.12-3_i386.deb
    How do I fix this error?

    Or how do I change the default install directory for apt-get?

    Please reply,

    Thanks in advance,

    Panarchy

  2. #2
    Join Date
    Jan 2009
    Beans
    118

    Re: How do I change the installation directory for apt-get? How do I use dpkg to inst

    from man dpkg:

    "--root=dir | --admindir=dir | --instdir=dir

    Change default directories. admindir defaults to
    /var/lib/dpkg and contains many files that give
    information about status of installed or uninstalled
    packages, etc. instdir defaults to / and refers to the
    directory where packages are to be installed. instdir
    is also the directory passed to chroot(2) before
    running pack‐age’s installation scripts, which means
    that the scripts see instdir as a root directory.
    Changing root changes instdir to dir and admindir to
    dir/var/lib/dpkg"

    probably should copy /var/lib/dpkg/* to your new admindir
    "the way up and the way down, are the same" (heraclitus)

  3. #3
    Join Date
    Sep 2007
    Beans
    180

    Re: How do I change the installation directory for apt-get? How do I use dpkg to inst

    Thanks. Seems complicated. I'll do my best.

    Panarchy

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •