seaver has asked for the wisdom of the Perl Monks concerning the following question:

Dear All,

I have a problem with the Xerces module I installed. It installed fine, and of course I installed it as root. However, any subsequent perl module I run that uses Xerces, needs me to be root to run it. If I'm not root, it gives me this error message:

Can't load '/usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi/aut +o/XML/Xerces/Xerces.so' for module XML::Xerces: libxerces-c1_7_0.so: +cannot open shared object file: No such file or directory at /usr/lib +/perl5/5.8.0/i386-linux-thread-multi/DynaLoader.pm line 229. at /usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi/XML/Xerces. +pm line 8

I can think of two things to do:

I was wondering though, what should I have done, when installing Xerces library to make sure I could run it as any user?? Was this simply a mistake in the Makefile??

Thanks Sam

Replies are listed 'Best First'.
Re: Using Xerces.so when not root??
by MidLifeXis (Monsignor) on Aug 22, 2003 at 16:55 UTC

    Not familiar with Xerces (although Esther may be ;), but I have seen things like this happen when the umask for the user running the install was set to strict (say, 077). If the permissions on the directories and files are cleared for other or group, that may be your problem.

    I would check the umask before you run the install. It should probably be something like 022 or 002 to get a reasonably secure install.

      umask was fine 0022...

      As it happens, i re-made XML::Xerces, but instead of using $XERCESROOT = /root/xercescdir, i installed xercesc into the system and used $XERCES_LIB and $XERCES_INCLUDE. The old XML::Xerces had been configured to look for the lib and includes in the root directory. THe use of the system installed files made XML::Xerces available system-wide.

      The XML::Xerces README doesnt mention this, it only says you can use either of the two options, should they have mentioned something about not unpacking and installing within the root home directory? Maybe it was my bad.

      Cheers

      Sam