3

I am trying to run gnuplot directly from Matlab (running in Debian Linux), but I get the following error:

>> unix('gnuplot defaults_loan10.p');
gnuplot: /usr/local/MATLAB/R2011b/sys/os/glnx86/libstdc++.so.6: version `GLIBCXX_3.4.11' not found (required by /usr/lib/i386-linux-gnu/libwx_baseu-2.8.so.0)

Running gnuplot from the console works perfectly well. How can I fix it?

1 Answer 1

3

That's because Matlab uses its own LD_LIBRARY_PATH

try to use the command setenv to set back this environment variable as you like.

For instance:

setenv('LD_LIBRARY_PATH','/usr/lib')

You can check the content of LD_LIBRARY_PATH befor and after by executing:

!echo $LD_LIBRARY_PATH
Sign up to request clarification or add additional context in comments.

4 Comments

So what should be the correct Matlab code to run? Sorry, I am not really experienced with Matlab...
Do you have experience with linux?
Just checked that this one also works: unix('LD_LIBRARY_PATH=/lib;gnuplot defaults_loan10.p');
If it works that is indeed a LD_LIBRARY_PATH issue, in your case, setenv('LD_LIBRARY_PATH','/lib');unix('gnuplot defaults_loan10.p'); should also work.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.