/bin/bash: command not found error

조회 수: 53 (최근 30일)
Ana
Ana 2022년 12월 21일
답변: MJFcoNaN 2022년 12월 21일
I have problems in a matlab script that executes a command from the bash terminal. This is the line in the script that gives error:
!tif2mrc irudiak_final.tif irudiak_final.ali
where irudiak_final.tif and irudiak_final.ali are two files, and the command is mrc2tif.
This is the error message that appears in the console:
>> !mrc2tif
/bin/bash: line 1: mrc2tif: command not found
However, when I run the same command from the bash terminal itself or when running the basic bash commands from the matlab script (mv, cp, etc) they run without errors. The error appears when calling a program whose path I have previously added to the $PATH variable in bash.
Moreover, this problem occurred when I tried to run the matlab script on CentOS Stream 9, as the same script does not give me any problem on another CentOS 7.9 machine.
I have found an issue that refers the same problem (https://es.mathworks.com/matlabcentral/answers/316062-bin-bash-stp-command-not-found) but I can't apply the accepted solution, as the matlab script they propose to modify is read-only.

답변 (1개)

MJFcoNaN
MJFcoNaN 2022년 12월 21일

카테고리

Help CenterFile Exchange에서 MATLAB Coder에 대해 자세히 알아보기

태그

제품


릴리스

R2022b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by