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.

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?

share|improve this question
    
'portmaster p5-' used to do the trick, but perl upgrades have always been pita on fbsd –  coincoin Dec 4 '13 at 9:48
1  
pkg_info can list your installed ports. –  Vinz Dec 4 '13 at 9:53

2 Answers 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.

share|improve this answer
1  
+1 Also pkg_add -r portupgrade is a quick way to install that package. –  Chris S Dec 4 '13 at 23:19
    
@sonia-hamilton : if the packages don't exist in that directory, then you can use pkg_info | grep '^p5' to list your installed p5* packages. Now you know which p5* ports you have to recompile. If there's no p5* packages installed, you have nothing more to do. –  Vinz Dec 5 '13 at 0:58

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.

share|improve this answer
    
Thanks user76776 for pointing out UPDATING. I'll have to RTFM on the differences between portmaster/portupgrade/pkgng - still BSD n00b. Commands 2 & 3 didn't solve problem (fsharp install), and command 1 failed (command not found) as I haven't installed portmaster (yet). –  Sonia Hamilton Dec 5 '13 at 0:53
    
There is a section in the handbook explaining how to use the portmaster/portupgrade tools with ports: freebsd.org/doc/handbook/ports-using.html. Keep in mind that you shouldn't use both portmaster and portupgrade at the same time (though it is possible with some extra work). Given that you are using pcbsd, you can install mono and fsharp from the package manager without any manual compilation. Running sudo pkg install fsharp should take care of the dependencies for you too. You can get more info about pkgng at freebsd.org/doc/handbook/pkgng-intro.html. –  user76776 Dec 5 '13 at 8:52
    
Thanks sudo pkg install fsharp "just worked". Now I need to study up on ports/portmaster/portupgrade/etc for future installs... –  Sonia Hamilton Dec 5 '13 at 23:20

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.