Command not found after installing p7zip
16,204
Solution 1
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....
Solution 2
p7zip
isn't enough, also had to install p7zip-plugins
... then it's /bin/7z
.
Related videos on Youtube
Author by
Amadeobee
Updated on September 18, 2022Comments
-
Amadeobee over 1 year
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
-
posfan12 over 5 yearsI get the same error, except that I am trying to execute 7za instead of 7z. I have checked, and the files are located in the correct directories AFAIK. Do I need to reboot before these changes take effect?
-
-
dessert almost 6 yearsGlad you solved the problem! What do you mean with “switched the direction”? Do you mean the shell script
/usr/bin/7z
containedexec /usr/local/lib/p7zip/7z "$@"
instead ofexec /usr/lib/p7zip/7z "$@"
? If so, that’s a major issue justifying a bug report I think. I can’t confirm for the repo packages of 16.04 and 18.04 – what release do you use? Please add this information to your question (edit). -
steeldriver almost 6 yearsThe real problem seems to be that you have a
7z
in/usr/local/bin
that is unrelated to the packages that you installed viaapt
, but is being run preferentially because of the order of yourPATH
-
Amadeobee almost 6 yearsI seem to have many 7z's around the computer, one on local and then a general one. I am not exactly sure how the installation system works if I install a program with sudo apt-get and if it depends where I currently am in the file structure... I originally downloaded it from the sourceforge sight, then after that didnt work I used apt-get.
-
Amadeobee almost 6 yearsI would appreciate it if either of you could point me in the direction of a book or source of reading where I can better understand how to navigate through local vs home vs usr when installing files and where the bash files end up (or is that dictated by the installation file and not where I am? ) again - thanks for the help!
-
Amadeobee almost 6 years@dessert - the version that I downloaded from source forge was 16.02 but with the apt-get I am not sure (and actually am not sure how to find the version) doing 7z --version isnt working..
-
Admin almost 2 yearsThis fixed the issue for me