Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6349735
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T21:40:26+00:00 2026-05-24T21:40:26+00:00

Hello Fellow Matlab Users, I was wondering if anyone could provide me with some

  • 0

Hello Fellow Matlab Users,

I was wondering if anyone could provide me with some insight on how to change the bash path environment in Matlab.

Basically, if I start a given application in the terminal outside of Matlab everything works fine. (e.g.: 3dMean)
However, if I try it in Matlab with the system command (system('~/abin/3dMean') (as you can see I have to tell Matlab where it is located) I get the following error:

dyld: Library not loaded: /usr/X11/lib/libpng12.0.dylib
  Referenced from: /Users/kjio/abin/3dMean
  Reason: Incompatible library version: 3dMean requires version 42.0.0 or later, but libpng12.0.dylib provides version 40.0.0
~/abin/3dMean: Trace/breakpoint trap

So I checked the bash PATH in Matlab, this is the output:

system('echo $PATH')

/usr/bin:/bin:/usr/sbin:/sbin

I tried to call the application with the following command:

system('env PATH=~/abin LD_LIBRARY_PATH=/usr/X11/lib 3dMean')

but that also doesn’t work. I get the same error message.

Next what I tried was to change the PATH:

setenv('PATH', [TEMP; getenv('PATH') ]);

In the variable TEMP were all the paths of interest out of the Terminal $PATH.
Now I could do that

system('3dMean')

But I get still the same error message.

Is there any way to update the maci64 env or how can I change the bash PATH in Matlab to overcome this problem ??

Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T21:40:27+00:00Added an answer on May 24, 2026 at 9:40 pm

    It looks like Matlab is linking against a different PNG library than when you run 3dMean from the command line. You probably want to change the DYLD_LIBRARY_PATH within matlab (not LD_LIBRARY_PATH) to point to a newer version of libpng

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Hello fellow Grails Developers! I was wondering if you could help me with what
Hello fellow Computer People! I could do this myself, but was just wondering if
Hello fellow coders & codetts I was wondering, if I needed to create a
Hello fellow coders. So i decided to rewrite some of my old scripts i
Hello there fellow Stackers! I wonder if anybody could tell me what the following
Hello fellow earthlings! For some time I'm fantasizing possible solutions, but i'm out of
Hello fellow StackOverflowers! I have some information in a database that I need pulled
Hello Fellow Computer People! Anyone willing to help will have my gratitude ;) Just
Hello fellow StackOverflow users (or Stackoverflowers ?): I'm learning-by-coding WPF. I read several articles/saw
hello fellow java developers. I'm having a bit of an issue here. I have

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.