Mrtrix.dll: cannot open shared object file: No such file or directory

Dear MRtrix3 Team,

I installed mrtrix3 to my win10 recently and it worked well. And now when I try to use it again, all commands show the following error message. I couldn’t remember I did anything to the path but now it’s like this.

Just in case it helps, I’m pasting the following too:

$ echo $PATH
/home/TimeFolder/mrtrix3/bin:/home/TimeFolder/mrtrix3/lib:/usr/local/bin:/usr/bin:/bin:/opt/bin:/c/Windows/System32:/c/Windows:/c/Windows/System32/Wbem:/c/Windows/System32/WindowsPowerShell/v1.0/:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl

Also I’ve tried modifying the ~/.bashrc file, but it’s all the same before and after. Here is the line containing “mrtrix3” now:

export PATH=~/mrtrix3/bin:~/mrtrix3/lib:$PATH

Could anyone help me figure this out? Thank you!

Best,
Tianyi

Hi Tianyi,

I’m not sure what’s going on here. Assuming your installation itself hasn’t been corrupted or modified in some way, you should find the mrtrix3.dll in the /home/TimeFolder/mrtrix3/bin (along with mrview.exe itself). That should be enough for the system to find it when launching mrview. The only thing I can think of is that you’re not using the correct version of the MSYS2 shell: MSYS2 comes with 3 shells, and it’s important to use the MinGW 64 bit version. There’s a chance things won’t work if you try to use the 32-bit version for instance.

If that doesn’t work, and you don’t find the mrtrix.dll file in the expected folder, it might be enough to reinstall the software, whichever way you originally used. If from source, a simple ./build might be sufficient. Otherwiwse, pacman -U mingw-XXXX.pkg.tar.xz (edit as appropriate) might do the trick.

Hi Donald,

Thank you for the hints. Actually I have found the trick. I pinned my MinGW 64 shell window to the taskbar, but surprisingly if I reopen it from the taskbar, it opens the MSYS version which pumped the error. So it’s now working when I open the correct MinGW 64 shell.

Thanks for you time.

Best,
Tianyi

1 Like