I have to install two packages (libidb and python-idb and both are depended to each other ) from third party.So,we can not get access of source code. I have tried with these following method to install and i got error also:

> > sumitkumars@administrator-Lenovo-U410:~$ sudo dpkg -i libidb-0.12.0-0b81d72-0.amd64.deb --instdir=/home/sumitkumars/mydir
> [sudo] password for sumitkumars:  (Reading database ... 186372 files
> and directories currently installed.) Preparing to unpack
> libidb-0.12.0-0b81d72-0.amd64.deb ... Unpacking libidb (0.12.0) over
> (0.12.0) ... dpkg: error processing archive
> --instdir=/home/sumitkumars/mydir (--install):  cannot access archive: No such file or directory Setting up libidb (0.12.0) ... Errors were
> encountered while processing:  --instdir=/home/sumitkumars/mydir

then i tried with this:

sumitkumars@administrator-Lenovo-U410:~$ sudo dpkg-deb -x libidb-0.12.0-0b81d72-0.amd64.deb /home/sumitkumars/mydir/

It is not giving error but it was not working with its another depency(python-idb)

I have added python also because it is unable to bind with "libidb".

4 Answers 4


# Example 
dpkg-deb -x somedeb.deb /home/yung/test


  • This works to some extent, but creates a dir named "usr" inside /home/yung/test which then contains lib and share. If your lib and your share directories are inside $TARGET_DIRECTORY, this won't work.
    – Macspider
    Oct 4, 2021 at 13:16
  • 3
    Decompressing is not the same as installing, e.g. postinst, prerm etc scripts are not run. Using --instdir=/path/to/root is the correct answer.
    – mirni
    Feb 25, 2022 at 22:43

A .deb is just an archive, like a zip file

You can manually extract it ; https://www.cyberciti.biz/faq/how-to-extract-a-deb-file-without-opening-it-on-debian-or-ubuntu-linux/

sudo apt install binutils

ar x your.deb

You then extract the .tar or whatever is in the .deb

tar xvf control.tar.gz
tar data.tar.gz

You can then manually copy the files to wherever you wish, I would use /usr/local so they are on your path, up to you.

You may need to read / run the config files and install scripts as well, cant say from what you have posted.

  • wouldn't it be better to use dpkg-deb for unpacking packing .deb files since it doesn't need to have something new to be installed?
    – Videonauth
    Nov 8, 2017 at 14:49
  • I am neutral on that ;)
    – Panther
    Nov 8, 2017 at 14:56
  • @Panther Thanks ,do i have to bind two library if both(libidb and python-idb) are complement to each other. Nov 8, 2017 at 18:58
  • @SumitKumarSuman I do not know I am not familiar with your package.
    – Panther
    Nov 8, 2017 at 19:00

In all other answers recommending decompressing archive -- that is not the same as installing! One of the notable differences is that postinst script is not run when using -x. The only satisfactory answer to the OPs question is this option, straight from man pages:

              Change default installation directory which refers to the
              directory where packages are to be installed. instdir is also the 
              directory passed to chroot(2) before running package's installation 
              scripts, which means that the scripts see instdir as a root
              directory.  (Defaults to «/»)
  • doesnt work for me. give error: dpkg (subprocess): admindir must be inside instdir for dpkg to work properly Jan 14 at 21:09

There is no need to extract the package contents of these two packages, only because they are dependent on each other.

Just give both packages at once when installing

dpkg -i libidb-0.12.0-0b81d72-0.amd64.deb python-idb-<version>.amd64.deb
  • 1
    This is not what's asked.
    – dimir
    Apr 16, 2020 at 12:09
  • @dimir Yes, this is not an answer to the question. But it is a solution to the problem of installing dependent packages. Apr 16, 2020 at 13:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.