Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I was asked to look over a laptop (OS X, 10.5) that was setup for a new developer, and I discovered that the pear executable was missing. This shop sets PHP up from source, so I navigated to the source tree where they'd compiled things and tried a make install, which failed with

Installing PEAR environment:      /usr/local/lib/php/
dyld: Library not loaded: /b/32_216/rdbms/lib/libclntsh.dylib.10.1
  Referenced from: /Users/username/Source/php-5.2.8/sapi/cli/php
  Reason: image not found
make[1]: *** [install-pear-installer] Trace/BPT trap
make: *** [install-pear] Error 2

So I tried a configure/make clean/make/make install, and hit the same problem.

All of these commands were run with sudo, as the source tree was owned by root.

I tracked the problem down to this command with make -n install-pear

sudo /Users/username/Source/php-5.2.8/sapi/cli/php -n -dshort_open_tag=0 -dsafe_mode=0 -dopen_basedir= -derror_reporting=E_ALL -dmemory_limit=-1 -ddetect_unicode=0 pear/install-pear-no    zlib.phar -d "/usr/local/lib/php" -b "/usr/local/bin"-dshort_open_tag=0 -dsafe_mode=0 -dopen_basedir= -derror_reporting=E_ALL -dmemory_limit=-1 -ddetec
Installing PEAR environment:      /usr/local/lib/php/
dyld: Library not loaded: /b/32_216/rdbms/lib/libclntsh.dylib.10.1
  Referenced from: /Users/username/Source/php-5.2.8/sapi/cli/php
  Reason: image not found
make[1]: *** [install-pear-installer] Trace/BPT trap
make: *** [install-pear] Error 2

What's strange, and possibly a red herring, is when I run the command as a non-root user, I seem to get further in the process

Installing PEAR environment:      /usr/local/lib/php/
[PEAR] Console_Getopt: failed to mkdir /usr/local/lib/php/Console
[PEAR] Archive_Tar: failed to mkdir /usr/local/lib/php/Archive
[PEAR] Structures_Graph: failed to mkdir /usr/local/lib/php/doc/Structures_Graph/docs/html/media
warning: pear/PEAR requires package "pear/Archive_Tar" (recommended version 1.3.2)
warning: pear/PEAR requires package "pear/Structures_Graph" (recommended version 1.0.2)
warning: pear/PEAR requires package "pear/Console_Getopt" (recommended version 1.2.3)
pear/PEAR can optionally use package "pear/XML_RPC" (version >= 1.4.0)
[PEAR] PEAR: failed to mkdir /usr/local/lib/php/OS

(Although it may be that when running as sudo those commands just run silently when they're successful.)

I thought it this might be a $PATH problem when running as sudo, but it seems like everything is similar there.

$ sudo echo $PATH
/usr/local/bin:/sw/bin:/sw/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin:/usr/X11R6/bin:/usr/local/instantclient

$ echo $PATH
/usr/local/bin:/sw/bin:/sw/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin:/usr/X11R6/bin:/usr/local/instantclient

The /usr/local/instantclient folder is where the missing library is located.

I'm at a bit of a loss as to the next "what do I check" steps are, and was hoping the ServerFault might be able to help me before I punt back to the IT folks.

share|improve this question
add comment

1 Answer

up vote 1 down vote accepted

This is your problem:

dyld: Library not loaded: /b/32_216/rdbms/lib/libclntsh.dylib.10.1

You probably don't have that /b directory at the root of your volume. I'm not sure why they'd have make set to pull something from there-maybe check one of the other machines and see if they have that /b directory tree at the root of their volume.

share|improve this answer
    
That did the the trick, thanks! –  Alan Storm Oct 14 '09 at 18:56
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.