# Missing library



## xy16644 (May 8, 2012)

Since updating my ports this evening, now have this error:

```
Can't load '/usr/local/lib/perl5/site_perl/5.8.9/mach/auto/RRDs/RRDs.so' for module RRDs:
 Shared object "librrd.so.5" not found, required by "RRDs.so" at
 /usr/local/lib/perl5/5.8.9/mach/DynaLoader.pm line 226.
```

If I look in /usr/local/lib I can only see:

```
alpha# ls librrd*
-rw-r--r--  1 root  wheel  334236 May  8 18:41 librrd.a
-rwxr-xr-x  1 root  wheel    1691 May  8 18:41 librrd.la*
lrwxr-xr-x  1 root  wheel      11 May  8 18:41 librrd.so@ -> librrd.so.6
-rwxr-xr-x  1 root  wheel  230779 May  8 18:41 librrd.so.6*
-rw-r--r--  1 root  wheel  331402 May  8 18:41 librrd_th.a
-rwxr-xr-x  1 root  wheel    1712 May  8 18:41 librrd_th.la*
lrwxr-xr-x  1 root  wheel      14 May  8 18:41 librrd_th.so@ -> librrd_th.so.6
-rwxr-xr-x  1 root  wheel  227131 May  8 18:41 librrd_th.so.6*
```

Do I have to create a link for librrd.so.5 as follows:
[cmd=]ln -s ln -s librrd.so.6 librrd.so.5[/cmd]

to fix this?

Thanks!


----------



## phoenix (May 8, 2012)

No.  You need to rebuild/reinstall everything that depends on librrd, so that they are are compiled against the new version of the shared library.


----------



## SirDice (May 9, 2012)

I would also suggest updating your perl, version 5.8 is rather old. Current version is 5.12.


----------



## xy16644 (May 9, 2012)

Does Perl need to be updated differently than other ports? The reason I ask is that all my ports are up to date! Just to be sure I updated all my ports again this morning and there was no update for Perl.

How do I update Perl to 5.12?


----------



## phoenix (May 9, 2012)

Did you update your *installed* ports, or only your ports *tree*?  They are two very different processes.

One uses portsnap(8) (update ports tree), the other uses a ports management tool like portmaster(8).


----------



## xy16644 (May 9, 2012)

Both. My ports tree is updated daily. My installed ports get updated manually by myself every week.


----------



## SirDice (May 10, 2012)

Perl 5.8 is still in the ports, which would show up as being 'updated'. To replace 5.8 with 5.12 you need portupgrade or portmaster:
`# portmaster -o lang/perl5.12 lang/perl5.8`

That will replace 5.8 with 5.12. After that you'll need to rebuild all ports depending on perl.


----------



## wblock@ (May 10, 2012)

xy16644 said:
			
		

> Does Perl need to be updated differently than other ports? The reason I ask is that all my ports are up to date! Just to be sure I updated all my ports again this morning and there was no update for Perl.
> 
> How do I update Perl to 5.12?



Updating Perl is no different than other ports.  The step that many people miss in upgrading ports is checking /usr/ports/UPDATING first, which has special procedures for some things (including changing Perl versions).  Just giving portmaster or portupgrade a -a is not enough.


----------



## jef (May 11, 2012)

You probably would be wise to do something like
`# portmaster -dbg 'p5-*' 'bsdpan-*'`
after you update perl.

The -dbg options are just my "minimal" ones -- use the ones that you find appropriate.

My recollection is that BSDPAN "ports" or the like magically appear if you have used CPAN or CPANPLUS to install perl packages. They should be taken care of as well. 

_Edit to add bsdpan-* to the list_


----------



## xy16644 (May 20, 2012)

Thanks to everyone for this reply.

I ran:
[CMD=""]portmaster -o lang/perl5.14 lang/perl5.8[/CMD]

To upgrade Perl to the latest version.

and:

[CMD=""]portmaster -r perl[/CMD]

To rebuild all the ports that depend on Perl.

Now when I run:

[CMD=""]perl -v[/CMD]

It says I am running the latest version: v5.14.2

There's just one thing I am curious about. When I run:

[CMD=""]pkg_version -vIL=[/CMD]

I get the following output:


```
pkg_version: corrupted record (pkgdep line without argument), ignoring
munin-main-1.2.6_1                  !   Comparison failed
pkg_version: corrupted record (pkgdep line without argument), ignoring
```

Is there anything I need to do to resolve this?


----------



## jb_fvwm2 (May 20, 2012)

Do you have portupgrade installed?

```
make fetchindex && portsdb -u && pkgdb -u && pkgdb -F --omit-check
```
(Would work in a majority of the instances)...
Or, look in /usr/ports/sysutils and deinstall all munin- stuff you have, and re-install all that you still need...


----------



## wblock@ (May 20, 2012)

xy16644 said:
			
		

> ```
> pkg_version: corrupted record (pkgdep line without argument), ignoring
> munin-main-1.2.6_1                  !   Comparison failed
> pkg_version: corrupted record (pkgdep line without argument), ignoring
> ```



Figure out what happened to munin-main.  Renamed in the ports, maybe.  Then run
`# portmaster --check-depends`

If that doesn't do it, run
`# find /var/db/pkg -name "+CONTENTS" -exec egrep -B1 -H 'pkgdep $' {} \; | less`
And rebuild the packages it finds.


----------



## xy16644 (May 20, 2012)

jb_fvwm2 said:
			
		

> Do you have portupgrade installed?
> 
> ```
> make fetchindex && portsdb -u && pkgdb -u && pkgdb -F --omit-check
> ...



I do have portupgrade installed. I tried to run that command but it errored saying:

```
alpha# make fetchindex && portsdb -u && pkgdb -u && pkgdb -F --omit-check
make: don't know how to make fetchindex. Stop
```

I do still want to run Munin as I use it quite often to monitor various items on the server. When I scroll to the bottom of the web page it generates it says:

```
This page was generated by Munin version 1.2.6 at 2012-05-20 T 20:40:06
```

But when I run:

[CMD=""]portmanager -u[/CMD] 

It say I have the latest Munin installed:
*munin-common-1.4.7 /sysutils/munin-common*

What am I missing?


----------



## wblock@ (May 20, 2012)

fetchindex is a target from the ports Makefiles, so you have to be in /usr/ports for it to be found.  The other commands there are portupgrade commands, which will only work if it is installed.

The error says you have munin-main installed, which is not a current port.

pkg_delete(1) the munin that's installed, then install the one you want from ports:
sysutils/munin-common
sysutils/munin-master
sysutils/munin-node


----------



## xy16644 (May 20, 2012)

wblock@ said:
			
		

> Figure out what happened to munin-main.  Renamed in the ports, maybe.  Then run
> `# portmaster --check-depends`
> 
> If that doesn't do it, run
> ...



I have run:

[CMD=""]portmaster --check-depends[/CMD]

and get the following on two ports:


```
===>>> Checking docproj-jadetex-1.17_4
        ===>>> print/ghostscript8 is listed as a dependency
        ===>>> but there is no installed version

        ===>>> Delete this dependency data? y/n [n]
===>>> Checking peps-2.0_4
        ===>>> Updating peps-2.0_4/+REQUIRED_BY
        ===>>> print/ghostscript8 is listed as a dependency
        ===>>> but there is no installed version

        ===>>> Delete this dependency data? y/n [n]
```

I accepted the default (no) but when I reran this command I got the same result. Should I rather say yes when prompted for these two ports?


----------



## wblock@ (May 20, 2012)

That happened because those ports depended on ghostscript8, but ghostscript has (probably) been upgraded to 9.  If you say yes, they won't depend on ghostscript at all any more, which is technically wrong but not likely to cause a problem as long as ghostscript9 is installed.  Otherwise, you can rebuild them and they should find ghostscript9 already installed and depend on it.


----------



## xy16644 (May 20, 2012)

By saying yes to:
`# # portmaster --check-depends`

I now only have:

```
munin-main-1.2.6_1                  !   Comparison failed
```

to deal with. If I go and uninstall this port, will my Munin monitoring webpage vanish?


----------



## wblock@ (May 20, 2012)

Files you have customized should remain.  But not all ports are good about that, so back up the configuration first.  Probably in /usr/local/etc.


----------



## xy16644 (May 20, 2012)

I have backed up the munin-node.conf and munin-node.conf config files.

I ran:
[CMD=""]pkg_delete munin-main-1.2.6_1[/CMD]

and now when I run [cmd=]pkg_version -vIL=[/cmd] it*'*s empty, yeah! Now I just need to get Munin updating again.


----------



## xy16644 (May 20, 2012)

It*'*s looking good. When I browse the Munin webpage it now shows the new version (1.4.7). Strangely though, I only have graphs for today's stats. Where have my weekly/monthly/yearly stats gone? Can I get them back?


----------



## wblock@ (May 20, 2012)

No idea.  Depends on where it keeps that data, disk or RAM.


----------



## xy16644 (May 20, 2012)

The above can be ignored. I can see all the history now. It just took a few minutes for Munin to catch up :e

Many MANY thanks for all your help. That helped me get all my ports up to date and all errors. My servers running smooth now!


----------

