sudo convert .... fails, on OSX, but convert is OK
Posted: 2010-01-28T02:04:11-07:00
Hello,
When I enter a convert command with sudo, it fails with the following errors:
dyld: Library not loaded: /ImageMagick-6.5.8/lib/libMagickCore.2.dylib
Referenced from: /usr/bin/convert
Reason: image not found
A library does exist at /usr/local/ImageMagick-6.5.8/lib/libMagickCore.2.dylib
and $DYLD_LIBRARY_PATH points at this lib directory.
Also, if I do a convert without sudo, it works fine. And sudo works fine for all other uses.
I am using Mac OS X 10.6 (Snow Leopard). ImageMagic-6.5.8 was installed from the binary at http://www.imagemagick.org/script/binar ... php#macosx
The initial problem was that convert did not work when being called from a php shell_exec('convert ...') command. I suspected it was a problem, because php is running as user _www and my profile is not executed. However, while investigating that problem, I discovered that sudo did not work, and that I think is a bug.
Any help would be greatly appreciated.
When I enter a convert command with sudo, it fails with the following errors:
dyld: Library not loaded: /ImageMagick-6.5.8/lib/libMagickCore.2.dylib
Referenced from: /usr/bin/convert
Reason: image not found
A library does exist at /usr/local/ImageMagick-6.5.8/lib/libMagickCore.2.dylib
and $DYLD_LIBRARY_PATH points at this lib directory.
Also, if I do a convert without sudo, it works fine. And sudo works fine for all other uses.
I am using Mac OS X 10.6 (Snow Leopard). ImageMagic-6.5.8 was installed from the binary at http://www.imagemagick.org/script/binar ... php#macosx
The initial problem was that convert did not work when being called from a php shell_exec('convert ...') command. I suspected it was a problem, because php is running as user _www and my profile is not executed. However, while investigating that problem, I discovered that sudo did not work, and that I think is a bug.
Any help would be greatly appreciated.