# Shared object "libsasl2.so.2" not found



## dennisv (Aug 5, 2013)

I installed Samba on my freebsd FreeBSD. After I type and enter the command `/usr/local/etc/rc.d/samba start` an error shows up: 

```
Starting nmbd.
/libexec/ld-elf.so.1: Shared object "libsasl2.so.2" not found, required by "libldap-2.4.so.8"
/usr/local/etc/rc.d/samba: WARNING: failed to start nmbd
```
Where can I get or download libsasl2.so.2? I cannot find it on the internet.


----------



## cpm@ (Aug 5, 2013)

Be sure you have installed security/linux-f10-cyrus-sasl2 which provides the missing libsasl2.so.2 library. 

```
[CMD]% pkg_info -W /compat/linux/usr/lib/libsasl2.so.2[/CMD]
/compat/linux/usr/lib/libsasl2.so.2 was installed by package linux-f10-cyrus-sasl2-2.1.22_1
```

Also reinstall again net/openldap24-client.


----------



## kpa (Aug 5, 2013)

I don't think this is the Linux version of SAMBA but the native port. My guess is that the LDAP related ports need to recompiled.


----------



## wblock@ (Aug 5, 2013)

Add also the complication that it was probably installed from a package.


----------



## dennisv (Aug 6, 2013)

cpu82 said:
			
		

> Be sure you have installed security/linux-f10-cyrus-sasl2 which provides the missing libsasl2.so.2 library.
> 
> ```
> [CMD]% pkg_info -W /compat/linux/usr/lib/libsasl2.so.2[/CMD]
> ...




Hi, after I did what you say it comes up with the failed error status below:

```
pkg_add -r linux-f10-cyrus-sasl2
Fetching [url]ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-8.3-release/Latest/linux-f10-cyrus-sasl2.tbz[/url]... Done.
Fetching [url]ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-8.3-release/All/linux_base-f10-10_4.tbz[/url]... Done.
sysctl: unknown oid 'compat.linux.osrelease'
linuxulator is not (kld)loaded, exiting
pkg_add: install script returned error status
pkg_add: pkg_add of dependency 'linux_base-f10-10_4' failed!
```


----------



## cpm@ (Aug 6, 2013)

dennisv said:
			
		

> Hi, after I did what you say it comes up with the failed error status below:
> 
> ```
> pkg_add -r linux-f10-cyrus-sasl2
> ...



You don't have loaded  linux.ko module which enables Linux binary compatibility. Type as root `kldload linux`. Please, consult instructions: http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/linuxemu-lbc-install.html.


----------



## SirDice (Aug 7, 2013)

Please note that you do not need security/linux-f10-cyrus-sasl2. It is for Linux binaries that require SASL, it's not used for native FreeBSD applications.


----------



## cpm@ (Aug 7, 2013)

Certainly libsasl2.so.2 was renamed to libsasl2.so.3 since last revision of security/cyrus-sasl2 and explains why I missed earlier. So would be better that you install it from ports to avoid problems like this. Furthermore, pay attention to the pros/cons of using ports or pre-compiled packages for installing third-party applications.

Also I just see you asked at pfSenSe Forum


----------

