Error executing shell-script commands in Matlab
8 ビュー (過去 30 日間)
古いコメントを表示
I am trying to run a .sh file in matlab and I get errors of which I have no idea. I am using the system command as follows:
system('sh path_to_file/file.sh') ;
I tried changing permissions
chmod -R 755 file
I am running Matlab on Ubuntu 18.04. I hope you can help me, thanks in advance.
Errors:
gnuplot: /home/user/Matlab2019a/bin/glnxa64/libQt5Network.so.5: no version information available (required by gnuplot)
gnuplot: /home/user/Matlab2019a/bin/glnxa64/libQt5Core.so.5: no version information available (required by gnuplot)
gnuplot: /home/user/Matlab2019a/bin/glnxa64/libQt5Core.so.5: no version information available (required by gnuplot)
gnuplot: /home/user/Matlab2019a/bin/glnxa64/libQt5Gui.so.5: no version information available (required by gnuplot)
gnuplot: /home/user/Matlab2019a/bin/glnxa64/libtiff.so.5: no version information available (required by /usr/lib/x86_64-linux-gnu/libgd.so.3)
gnuplot: /home/user/Matlab2019a/bin/glnxa64/libtiff.so.5: no version information available (required by /usr/lib/x86_64-linux-gnu/libwx_gtk2u_core-3.0.so.0)
gnuplot: relocation error: gnuplot: symbol qt_version_tag version Qt_5.9 not defined in file libQt5Core.so.5 with link time reference
1 件のコメント
Guillermo Camacho
2022 年 8 月 1 日
Did you solve it?
Same type of problem while executing a PDAL command from matlab in Ubuntu 19.04
command =
'pdal translate ~/Documents/boxesDatabaseSample/corrida1/"Depth Long Throw"/132696437677359737.ply frame1.ply --writers.ply.dims="X=float32,Y=float32,Z=float32"'
K>> system(command)
pdal: /usr/local/MATLAB/R2021b/bin/glnxa64/libtiff.so.5: no version information available (required by /usr/local/lib/libgdal.so.30)
ans =
0
回答 (1 件)
Himanshu
2024 年 10 月 24 日 6:26
編集済み: Himanshu
2024 年 10 月 24 日 6:27
Hey,
The errors mentioned anobe indicates conflicts between MATLAB and the system libraries used by gnuplot. MATLAB ships with its own version of certain libraries, which can conflict with the versions required by other software like gnuplot.
You can try the folloiwng things to resolve these errors:
- You can try preventing MATLAB's libraries from interfering. You can try running the script in a subshell that doesn't inherit the MATLAB environment.
system('bash -c "path_to_file/file.sh"');
- You can temporarily modify the LD_LIBRARY_PATH environment variable within your script to exclude MATLAB's library paths.
# Inside file.sh
export OLD_LD_LIBRARY_PATH=$LD_LIBRARY_PATH
export LD_LIBRARY_PATH=/usr/lib:/usr/local/lib # Add other paths as needed
gnuplot your_script.gnuplot
export LD_LIBRARY_PATH=$OLD_LD_LIBRARY_PATH
- If the use of gnuplot is not strictly necessary, consider using MATLAB's native plotting capabilities, which might avoid these library conflicts altogether.
0 件のコメント
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!