6

Just getting started with Linux/Ubuntu. I installed 7z but the command is not found. I restarted the computer to hopefully refresh commands but that didn't help either.

Here is what I did:

sudo apt-get install p7zip
sudo apt-get install p7zip-full

Then tried

7z e [file-name].xz

and

7za e [file-name].xz

then I read up the man file but still nothing. Every time i get the following reply:

/usr/local/bin/7z: 2: /usr/local/bin/7z: /usr/local/lib/p7zip/7z: not found
dessert
  • 40,956
Amadeobee
  • 111

3 Answers3

5

figured it out!

the path in the bin file was pointing to the wrong place.

i needed to switch the direction from the

usr/local/lib/p7zip/ 

directory to

usr/lib/p7zip/

directory....

Amadeobee
  • 111
2

p7zip isn't enough, also had to install p7zip-plugins ... then it's /bin/7z.

0

Thanks Amadeobee! /usr/lib/p7zip/7z x your_file_name can fix the issue.

Or you can edit usr/local/bin/7z:

sudo vim /usr/local/bin/7z

replacing:

/usr/local/lib/p7zip/7z

with:

/usr/lib/p7zip/7z

The result is as follows:

(base) j@lab:~/doc/code$ 7z x deep_motion_mag-master.7z
/usr/local/bin/7z: 2: /usr/local/bin/7z: /usr/local/lib/p7zip/7z: not found
(base) j@lab:~/doc/code$ 7z x deep.7z
7-Zip [64] 9.20  Copyright (c) 1999-2010 Igor Pavlov  2010-11-18
p7zip Version 9.20 (locale=en_US.UTF-8,Utf16=on,HugeFiles=on,32 CPUs)
Processing archive: deep_motion_mag-master.7z
Extracting  deep
Extracting  deep/configs
...