libperl.so not found

Hey everybody,

For a few months now I have been running freebsd FreeBSD 9.1, a webserver with Nginx. I have rebooted and restarted Nginx many times. But today I got an error:
Code:
root@web-shared:/usr/local/lib/perl5/5.14.2/man # /usr/local/etc/rc.d/nginx restart
Performing sanity check on nginx configuration:
Shared object "libperl.so" not found, required by "nginx"
root@web-shared:/usr/local/lib/perl5/5.14.2/man #
So I found a topic here that suggested the following:
Code:
cp /usr/local/lib/perl5/5.14.2/mach/CORE/libperl.so /usr/local/lib
But my /usr/local/lib/perl5/5.14.2/ doesn't contain a mach directory or the libperl.so file at all. I need to restart Nginx to add some websites, I dare not to reboot it in fear of Nginx not starting.

Any suggestions?
 
Please do not copy or link old libraries to "fix" a problem.

Read and follow the instructions about upgrading Perl (and everything else) in /usr/ports/UPDATING. This will rebuild many things.
 
Basically perl-after-upgrade got removed.

I emailed the ports maintainer to ask why such a silly thing has been carried out.

Previously running perl-after-upgrade would fix all the modules in about 5 seconds and tell you at the end which binaries need recompiling, now you have to run a risky portupgrade command which recompiles many ports that depend on Perl (in my case 130), during this time various software may be broken until its completed. I say it's risky because some ports may fail to recompile leaving you with missing Perl modules, also some dependencies you don't want may get installed e.g. I have PHP and Apache installed from source and I don't want rrdtool14 since it creates messy cacti graphs, so I manually compile some ports after editing makefiles to change the dependencies, running a portupgrade command to mass upgrade over 100 ports without interactivity is pretty risky for me.

Also this change seems to make portupgrade crash, I had to run it four times, as the first three times it crashed after a Perl module got recompiled. So I have asked the maintainer why he has changed something that didn't need fixing. This is a bad downside of the ports system when occasionally a port maintainer does something crazy, e.g. errors such as this. Since the Perl changes.

Code:
Can't locate Module/Metadata.pm in @INC (@INC contains: t/lib t/bundled lib /usr/local/lib/perl5/5.12/BSDPAN /usr/local/lib/perl5/site_perl/5.12/mach /usr/local/lib/perl5/site_perl/5.12 /usr/local/lib/perl5/5.12/mach /usr/local/lib/perl5/5.12 .) at lib/Module/Build/ModuleInfo.pm line 10.
Compilation failed in require at lib/Module/Build/Base.pm line 25.
BEGIN failed--compilation aborted at lib/Module/Build/Base.pm line 25.
Compilation failed in require at lib/Module/Build.pm line 15.
BEGIN failed--compilation aborted at lib/Module/Build.pm line 15.
Compilation failed in require at Build line 42.
BEGIN failed--compilation aborted at Build line 42.
*** Error code 2
 
As @wblock@ suggested, read the UPDATING. And no, upgrading ~100 ports isn't risky, if you take care and nurture your ports. If some of them break, you have a broken system already, and it means you were playing with custom patches, and unsafe options under make.conf, so you're sitting on a time bomb anyway.
 
Last edited by a moderator:
Although I fully agree with @jozze on this matter there is one thing you might not be aware of.

chrcol said:
I say its risky because some ports may fail to recompile leaving you with missing perl modules, also some dependencies you dont want may get installed eg. I have php and apache installed from src and I dont want rrdtool14 since it creates messy cacti graphs
I'm a little bit confused here because the only rrdtool I'm aware of is databases/rrdtool. I think that's what you're referring too, a quick Internet search showed me something about "RRD graphics", but this port doesn't get automatically installed as a dependency when using both Apache and PHP.

Even so, I think there are two misconceptions here. You can override and reconfigure a lot within the ports collection, and not by merely using specific options during the configuration stage (using # make config). The ports(7) manual page already hints at this when you check the ENVIRONMENT section which basically lists everything you can override.

But it doesn't stop there. If you need even more hands on access you could check the big "Kahuna", or /usr/ports/Mk/bsd.port.mk, that should lead you to the right options overview. For example, when it comes to PHP you might want to look into bsd.php.mk.

Not saying that this is a sure way to solve whatever problem you currently have, I honestly don't know, but I do get the feeling that the ports collection provides a lot more options to fine tune the building of the port than you might be aware of.

But another issue: portmaster. If you use portmaster for all this then you'll never run into any problems that some ports may remain broken because one specific port failed to build. Simply because portmaster will give you a very good overview of where the error occurred, but also shows you how you can continue the build process effectively excluding everything that has been built before.

It keeps track of what it's doing. So you'll always know which ports were build and which still need to be build.

For what's it worth, I've rebuilt Perl on a system which uses mail/horde-webmail and so had to deal with a lot of PECL dependencies. Approximately 240 ports needed to be rebuilt but it really was merely a matter of starting portmaster and be done with it.

Even though I did at one time came across an issue of a port trying to set[]up print/ghostscript9 while in fact it should have been using print/ghostscript9-nox11. The cause of that was my own doing somewhere in the past, but using portmaster really helped me solve this nasty loop.
 
Last edited by a moderator:
Back
Top