FreeBSD how to rebuild all p5-* Perl 5 ports
On a FreeBSD system, instructions say to rebuild all p5-* ports - how do I do that?
A bit of background... I'm an experienced Linux person, trialling (and liking) the latest PC-BSD (PCBSD9.2-RELEASE-x64). I've previously installed simple packages and ports ok, I thought I would try some more exotic - mono and F#:
cd /usr/ports/lang/mono && make install clean BATCH=yes && \
cd /usr/ports/lang/fsharp && make install clean BATCH=yes
I got this error output:
configure: error: perl module Locale::gettext required
===> Script "configure" failed unexpectedly.
Please read UPDATING entry 20130612
(http://svnweb.freebsd.org/ports/head/UPDATING?r1=320405&r2=32067) and
PR/184276 (http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/184276) to fix
your Perl installation if you got the error message "configure: error: perl
module Locale::gettext required".
The first link doesn't work (why not?) but the second link (http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/184276) explains that "the directory structure where Perl is installed has also been modified .... [as] a result of the 20130612 layout change" and that the fix is to:
rebuild all p5-* ports
I presume all p5-* ports means all Perl 5 ports. How do I find what Perl 5 ports I have installed? And rebuild all of them?
Solution 1:
Generally, you can consult the contents of the /usr/ports/UPDATING
file on how to deal non-trivial upgrades. Usually, it provides solutions for users that are using portupgrade, portmaster or binary pkgng packages.
Here are the instructions from the 20130612 entry in the UPDATING file:
...
Please rebuild all Perl ports and all ports that depend on it:
# portmaster -r perl
or
# portupgrade -rf perl
or
# pkg install -fR perl
The first instruction is for systems using the ports-mgmt/portmaster
port, the second is for systems using the ports-mgmt/portupgrade
port and the third one is for systems using binary pkgng packages.
I am afraid that if you wanted to avoid installing a port manager/helper tool you'd have a more difficult job because you'll have to go through every single Perl 5 port manually and run make deinstall && make reinstall
.
Solution 2:
Try portupgrade -f /var/db/pkg/p5*
. This will rebuild all your installed p5*
ports.
portupgrade
is not part of the base system. You can find this port in ports-mgmt/portupgrade
.