# libdb-* not found



## hexadecagram (Aug 27, 2013)

I have several packages/ports failing with the following:


```
===>   evolution-data-server-2.32.1_4 depends on shared library: libdb-4.8.so - not found
===>    Verifying for libdb-4.8.so in /usr/ports/databases/db48
===>  Installing for db48-4.8.30.0
===>   Generating temporary packing list
===>  Checking if databases/db48 already installed
===>   db48-4.8.30.0 is already installed
      You may wish to ``make deinstall'' and install this port again
      by ``make reinstall'' to upgrade it properly.
      If you really wish to overwrite the old port of databases/db48
      without deleting it first, set the variable "FORCE_PKG_REGISTER"
      in your environment or the "make install" command line.
*** [check-already-installed] Error code 1

Stop in /usr/ports/databases/db48.
*** [lib-depends] Error code 1

Stop in /usr/ports/databases/evolution-data-server.
*** [build] Error code 1

Stop in /usr/ports/databases/evolution-data-server.

===>>> make failed for databases/evolution-data-server
===>>> Aborting update
```

I use `portmaster -dP --no-confirm` in most cases for everything, and databases/evolution-data-server is not the only port that I'm having trouble with. Others include devel/apr1, www/libxul, and x11-toolkits/libgnomui, to name a few.

I have 
	
	



```
WITH_BDB_HIGHEST=yes
```
 set in /etc/make.conf and a number of configurations in /usr/local/etc/buildflags.conf.

Disabling /etc/make.conf and /usr/local/etc/buildflags.conf entirely still gives me the same or similar errors (even when the port tries to build with, e.g., databases/db41 as a dependency).

Re-building db4[1-8] succeeds but even after re-installing, I still see the same error.

Any thoughts?


----------



## hexadecagram (Aug 27, 2013)

Oops, I forgot to mention this:


```
% ls -FL /usr/local/lib/libdb-4*                                         
/usr/local/lib/libdb-4.2.so*    /usr/local/lib/libdb-4.6.so.0*
/usr/local/lib/libdb-4.2.so.2*  /usr/local/lib/libdb-4.7.so*
/usr/local/lib/libdb-4.4.so*    /usr/local/lib/libdb-4.7.so.0*
/usr/local/lib/libdb-4.4.so.0*  /usr/local/lib/libdb-4.8.so*
/usr/local/lib/libdb-4.6.so*    /usr/local/lib/libdb-4.8.so.0*
```

All symlinks can be traced to actual library files. Still, my system claims they cannot be found.


----------



## ShelLuser (Aug 27, 2013)

One thing which immediately pops through my mind, though it might not be directly related to your issues, is wondering what package manager you're using and if you perhaps recently switched from the previous "pkg_* tools" to the modern pkgng system?

The only time I've had issues like these was when the system apparently couldn't make up it's mind regarding print/ghostscript9 and print/ghostscript9-nox11 which makes me somewhat wonder if this isn't the same for you.

What was happening on my end is that although everything was cleanly set up and installed (no dependency issues either) several ports insisted to install print/ghostscript9 which would then give the almost same errors; it was already installed, but that was actually a meta-port.

I eventually fixed all that by getting rid of the meta port and instead keep print/ghostscript9 installed with the NO_X11 flag set (I also have this flag set in make.conf).

Even so it's definitely related in some sense. I didn't bother with this db approach myself because it's pretty common to keep several versions of BerkeleyDB around; especially since it isn't fully downwards compatible. As such I have 3 versions installed:


```
root@smtp2:/usr/ports/www # pkg_info -Ix ^db
db41-4.1.25_4       The Berkeley DB package, revision 4.1
db42-4.2.52_5       The Berkeley DB package, revision 4.2
db47-4.7.25.4       The Berkeley DB package, revision 4.7
```
Where the majority of the software relies on db42-4.2.52_5.

Even so; I don't quite understand why you'd want to bother with this; it's not as if these packages gobble up a huge amount of disk space:


```
root@smtp2:/usr/ports/www # pkg_info -sx ^db
Information for db41-4.1.25_4:

Package Size:
9000    (1K-blocks)

Information for db42-4.2.52_5:

Package Size:
18810   (1K-blocks)

Information for db47-4.7.25.4:

Package Size:
37111   (1K-blocks)
```
So totalling to approximately 64Mb 64 MB.

My advice would be not to try to force a specific database version and use FORCE_PKG_REGISTER for now to make sure that the program installs and registers the BerkeleyDB version it initially depends on.


----------



## hexadecagram (Aug 27, 2013)

ShelLuser said:
			
		

> One thing which immediately pops through my mind, though it might not be directly related to your issues, is wondering what package manager you're using and if you perhaps recently switched from the previous "pkg_* tools" to the modern pkgng system?





			
				hexadecagram said:
			
		

> I use `portmaster -dP --no-confirm` in most cases for everything,



I did leave out whether I'm using pkgng or not. I am not.



			
				ShelLuser said:
			
		

> My advice would be not to try to force a specific database version and use FORCE_PKG_REGISTER for now to make sure that the program installs and registers the BerkeleyDB version it initially depends on.



I accidentally ran `portmaster -dP -m FORCE_PKG_REGISTER=yes --no-confirm` without removing 
	
	



```
WITH_BDB_HIGHEST=yes
```
 from /etc/make.conf and got a successful build and install---at least, with evolution-data-server.

I will try the same with the other ports that are complaining and see what happens.

This should be a one-time thing, should it not?


----------



## hexadecagram (Aug 28, 2013)

Here's an update.

I've left 
	
	



```
WITH_BDB_HIGHEST=yes
```
 in /etc/make.conf and re-built the problematic ports using `portmaster -dP -m FORCE_PKG_REGISTER=yes --no-confirm`. All have built and installed successfully and the rest of my upgrade process is proceeding, so I'm marking this as [Solved].


----------

