LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Debian (https://www.linuxquestions.org/questions/debian-26/)
-   -   Installing .deb file to a different location on Linux Mint (https://www.linuxquestions.org/questions/debian-26/installing-deb-file-to-a-different-location-on-linux-mint-4175523403/)

Drakkahn 10-26-2014 02:56 PM

Installing .deb file to a different location on Linux Mint
 
I've been trying to install a .deb file from my travel drive to another location on my travel drive using this command:

Code:

sudo dpkg --install "/media/mom/KING KAHN/XMind/Linux/xmind-linux-3.4.1.201401221918_i386.deb" --root="/media/mom/KING KAHN/XMind/Linux/"
For some reason this is not working, so how could I fix this?

Code:

(Reading database ... 156287 files and directories currently installed.)
Preparing to replace xmind 3.4.1 (using .../xmind-linux-3.4.1.201401221918_i386.deb) ...
Unpacking replacement xmind ...
dpkg: error processing --root=/media/mom/KING KAHN/XMind/Linux/ (--install):
 cannot access archive: No such file or directory
Setting up xmind (3.4.1) ...
Processing triggers for desktop-file-utils ...
Processing triggers for gnome-menus ...
Processing triggers for mime-support ...
Processing triggers for shared-mime-info ...
Errors were encountered while processing:
 --root=/media/mom/KING KAHN/XMind/Linux/


jlinkels 10-26-2014 07:31 PM

I have never done this before, but a look at the man page tells the --root=/foo command makes /foo the root directory for the entire installation process.

So 2 things could be happening: If the install package is located in /foo/blah.deb, you should install blah.deb, not /foo/blah.deb.

Secondly, dpkg expects a complete directory tree with directories like /usr /bin /lib /etc and so on. Once you set root to /foo, there must be a directory structure below /foo, thus /foo/usr, /foo/var. And that might be the hardest, I don't know if dpkg creates them.

Besides, any package running expects a correctly set up /tmp, /var, /bin, /etc and whatnot. If you don't have them, the program doesn't run.

jlinkels

Hungry ghost 10-27-2014 02:48 AM

I'm not familiar with the --root option either. I tried it specifying an empty directory but it didn't work in my case (i.e. the package got installed on my root file system instead of the directory I specified).

That said, I think the OP's problem is that the path to the package contains a space and dpkg doesn't seem to like it, even if quotes are being used. I would simply try to cd into the directory containing the package and specify the root install directory scaping the space with a back slash.

edit: In addition, dpkg probably expects a file system structure in the target directory as jlinkels said.


All times are GMT -5. The time now is 10:26 PM.