When using Unity Hub on linux, some modules may seem to silently fail to install after downloading. This appears to happen mostly on Windows build target modules, which often contain compressed .7z archives.
Despite being a required dependency for extracting these archives, UnityHub might not always install 7z automatically. This issue was encountered on Unity Hub 3.15.3; other versions may also be impacted.
Checking Unity Hub Logs
Assuming that UnityHub has been installed without the use of a sandbox such as Flatpak, logs can be found at ~/.config/unityhub/logs/info-log.json. To quickly check the logs, open in a text editor and scroll to the end of the file or use the tail command.
tail -f ~/.config/unityhub/logs/info-log.json
If you see an error message like this:
Error in extractPkgFile: Error: Command ‘7z’ not found in PATH or known locations: /usr/bin/7z, /bin/7z
Then it’s likely the cause of the issue. This fix should help resolve it.
Installing 7z Dependency for UnityHub
p7zip is the official cli tool port of 7-Zip archiver to POSIX-compliant operating systems like Unix, Linux, and macOS.
Debian/Ubuntu
sudo apt install p7zip-full -y
Fedora/RHEL
sudo dnf install p7zip p7zip-plugins -y
Verify 7z Install Location
You can check that 7z is installed in one of the paths UnitHub expects using the whereis command.
whereis 7z
Expected output:
7z: /usr/bin/7z