status of perl?

Status
Not open for further replies.

pallfreeman

Dabbler
Joined
Sep 1, 2011
Messages
38
Anyone know what's happening with perl on 8? (I'm using RC1).

It's still half-there:

Code:
[root@rocket] ~# perl -v
/libexec/ld-elf.so.1: Shared object "libperl.so" not found, required by "perl"
[root@rocket] ~# ls -l /usr/local/bin/perl*
-rwxr-xr-x  2 root  wheel   7208 Aug 31 20:02 /usr/local/bin/perl*
-r-xr-xr-x  1 root  wheel  13859 Aug 16 20:57 /usr/local/bin/perl-after-upgrade*
lrwxr-xr-x  1 root  wheel     25 Aug 31 19:58 /usr/local/bin/perl5@ -> /usr/local/bin/perl5.12.4
-rwxr-xr-x  2 root  wheel   7208 Aug 31 20:02 /usr/local/bin/perl5.12.4*
-rwxr-xr-x  2 root  wheel  45807 Aug 16 20:56 /usr/local/bin/perlbug*
-rwxr-xr-x  1 root  wheel    236 Aug 16 20:56 /usr/local/bin/perldoc*
-rwxr-xr-x  1 root  wheel  12466 Aug 16 20:56 /usr/local/bin/perlivp*
-rwxr-xr-x  2 root  wheel  45807 Aug 16 20:56 /usr/local/bin/perlthanks*


Very happy to see 5.12.4, though. I can drop the package in no problem, just wondering about intent.
 

b0redom

Dabbler
Joined
Sep 2, 2011
Messages
40
How do you drop in a package? I'm having a play and could really do with having perl working on the system. Not used FreeBSD in anger in years.

TIA
 

pallfreeman

Dabbler
Joined
Sep 1, 2011
Messages
38
How many ways to skin a cat? :)

First thing you'll need is some temp space. There might be enough on your USB stick but don't count on it.
Code:
[root@rocket] ~# df /mnt/thepool
Filesystem 1K-blocks   Used     Avail Capacity  Mounted on
thepool    157924995 741874 157183120     0%    /mnt/thepool
[root@rocket] ~# ls -ld /mnt/thepool/tmp
drwxr-xr-x  2 root  wheel  2 Aug 30 20:11 /mnt/thepool/tmp/


cd into your temp space and grab the package. I just happen to have one handy:
Code:
[root@rocket] ~# cd /mnt/thepool/tmp
[root@rocket] /mnt/thepool/tmp# wget http://www.xenopsyche.com/ip/tmp/perl-5.12.4_1-amd64.tbz


Tell the package manager where to find temp:
Code:
[root@rocket] /mnt/thepool/tmp# setenv PKG_TMPDIR /mnt/thepool/tmp

Now, this is the naughty part. The rootfs is mounted read-only.
Code:
[root@rocket] /mnt/thepool/tmp# mount -u -o rw /

Install the package, using the force (-f) to overwrite the half-installed version:
Code:
[root@rocket] /mnt/thepool/tmp# pkg_add -f perl-5.12.4_1-amd64.tbz


That's it. If you want, you can:
Code:
[root@rocket] /mnt/thepool/tmp# mount -u -o ro /

to be safe.

That's how I did it. Substitute "-i386" if you're running 32-bit. I don't know what the "proper" way is!

I'm planning to build an add-on, so I'd appreciate advice from someone who actually knows what they're doing. :)
 

b0redom

Dabbler
Joined
Sep 2, 2011
Messages
40
Thanks for that!

I plan on getting S3 integration working on the command line and pluginifying it as an when the framework becomes available.
 

pallfreeman

Dabbler
Joined
Sep 1, 2011
Messages
38
Amazon S3? Cool! As a backup solution, or as shareable volumes?

My aims are far more modest. I'm messing with Logitech/Slim Devices Squeezebox Server. Since I already run it on FreeBSD it should be simple, but having the FreeNAS perl distributed in such a bizarre state means I'm kinda stuck at the first decision: whether to bundle perl in with my installer and where to put it if so. There are some advantages to bundling, but, y'know, it's Just Not Right. :)
 

t3h0th3r

Dabbler
Joined
Jul 29, 2011
Messages
14
the error is caused by a missing symlink, there's an easy fix:

Code:
mount -uw /
ln -s /usr/local/bin/perl5.12.4 /usr/bin/perl
mount -ur / 
 

pallfreeman

Dabbler
Joined
Sep 1, 2011
Messages
38
Really? I'll try that next time I do an install. Thanks.

I suppose my real question is: when I get to use RC2 or later, should I expect perl to work out-of-the-box? I think I should, FWIW.
 

pallfreeman

Dabbler
Joined
Sep 1, 2011
Messages
38
the error is caused by a missing symlink, there's an easy fix:

I just installed the 32-bit version of FreeNAS 8.0.1 RC1 into a VM. I can't figure out how to fix this just by adding a link. Screenshot attached.
 

Attachments

  • noperl.jpg
    noperl.jpg
    43 KB · Views: 236

t3h0th3r

Dabbler
Joined
Jul 29, 2011
Messages
14
Hmm weird, it did fix the issue when it occured on my box...

What do you get when you just execute
Code:
perl -v

from anywhere?

The issue with the missing symlink is, that most perl-scripts require perl to be at /usr/bin/perl. By default FreeBSD creates this symlink is created when perl is installed.
 

pallfreeman

Dabbler
Joined
Sep 1, 2011
Messages
38
Hmm weird, it did fix the issue when it occured on my box...
Was it a fresh install of RC1?
What do you get when you just execute
Code:
perl -v

from anywhere?

Shared object "libperl.so" not found, required by "perl". Not surprisingly, since the find on the end of that screenshot up there didn't find one.

The issue with the missing symlink is, that most perl-scripts require perl to be at /usr/bin/perl. By default FreeBSD creates this symlink is created when perl is installed.

Yeah. It's the FreeNAS (and NanoBSD) differences that keep tripping me up. I can generally find my way around FreeBSD OK.

I'm so modest. I've been using FreeBSD since 2.2.5. :)
 

t3h0th3r

Dabbler
Joined
Jul 29, 2011
Messages
14
Was it a fresh install of RC1?

It was beta4 to which i upgraded from 8.0

Yeah. It's the FreeNAS (and NanoBSD) differences that keep tripping me up. I can generally find my way around FreeBSD OK.

I'm so modest. I've been using FreeBSD since 2.2.5. :)

tell me about it. i have only been working with FreeBSD for a bit over 3 years, but FreeNAS is a completely different story :)
 

pallfreeman

Dabbler
Joined
Sep 1, 2011
Messages
38
It was beta4 to which i upgraded from 8.0

From my perspective, that makes you an expert. You probably fixed your perl without even
thinking about it, and then forgot. :tongue:
 

t3h0th3r

Dabbler
Joined
Jul 29, 2011
Messages
14
From my perspective, that makes you an expert. You probably fixed your perl without even
thinking about it, and then forgot. :tongue:

I mean, i had this issue on Beta4, then i fixed it like this, then i upgraded to RC1 where perl worked out of the box.
 

bertrem

Dabbler
Joined
Feb 19, 2013
Messages
15
Re-opening this since 8.3.1-p2 seems to be missing perl again.
pallfreeman's instructions for installation seem to basically work, except as follows:

Code:
[root@rocket] /mnt/thepool/tmp# wget http://www.xenopsyche.com/ip/tmp/perl-5.12.4_1-amd64.tbz

This location no longer works, and this version is old. You can get the latest I could find via:

Code:
wget http://mirror.ancl.hawaii.edu/pub/FreeBSD/ports/amd64/packages-8-stable/devel/perl-5.16.0.tbz


Code:
[root@rocket] /mnt/thepool/tmp# pkg_add -f perl-5.12.4_1-amd64.tbz

I didn't actually even need the -f flag, since it seems perl really just wasn't installed at all. There was nothing to forcibly overwrite.
 
Status
Not open for further replies.
Top