MATLAB Add-On Installation Error on Linux: Solved
I recently tried installing the Wavelet Toolbox add-on in MATLAB R2025a on Ubuntu, and I kept running into this annoying error:
There was an error while installing product files.
archive_write_header(): Failed to create dir ‘/home/<user>/MATLAB_2025/resources/…’
MATLAB told me the install directory was writable, but the installer still failed every single time.
Turns out the problem wasn’t MATLAB itself — it was Linux file permissions.
When I first installed MATLAB, I used sudo
, which meant parts of the installation ended up owned by root.
So when MATLAB (running as my normal user) tried to add files, it hit a wall. It simply didn’t have permission.
I checked the permissions of the resources
folder:
ls -ld ~/MATLAB_2025/resources
See that root root
? That means the folder belongs to the root user, not me.
drwxr-xr-x 308 root root 12288 Jun 5 10:20 /home/myuser/MATLAB_2025/resources
The Fix (Super Simple)
All I had to do was change the ownership of my MATLAB installation back to me:
sudo chown -R myuser:myuser ~/MATLAB_2025