Code Yarns ‍👨‍💻
Tech BlogPersonal Blog

ATool error: Can't exec 7z

📅 2014-May-08 ⬩ ✍️ Ashwin Nanjappa ⬩ 🏷️ 7zip, atool ⬩ 📚 Archive

The apack and aunpack tools from the atool package are a convenient way to compress and uncompress files of most compression formats. When you try to compress or uncompress a file in 7-Zip format, you get this error:

$ apack foobar.7z foobar.txt  
Can't exec "7z": No such file or directory at /usr/bin/apack line 1869.
7z: cannot execute - No such file or directory
apack: 7z ...: non-zero return-code

This error continues even after I installed the p7zip package. It turns out that p7zip does not contain the 7z executable needed for compression. What you need to use 7-Zip with atool is p7zip-full:

$ sudo apt-get install p7zip-full

Tried with: 7-Zip 9.20, ATool 0.39.0 and Ubuntu 14.04