# Samba36 does not start (smbd error with libffi.so.6)



## francisco (Jul 15, 2015)

Please help!

Some how I broke my FreeBSD 9.1 server. Now, after reinstalling all ports I'm in trouble with Samba36, more specifically smbd that does not start.


```
# service samba start
Removing stale Samba tdb files: ... done
Starting nmbd.
Starting smbd.
Shared object "libffi.so.6" not found, required by "libp11-kit.so.0"
/usr/local/etc/rc.d/samba: WARNING: failed to start smbd
Starting winbindd.
```


```
# uname -a
FreeBSD myserver.domain 9.1-RELEASE-p3 FreeBSD 9.1-RELEASE-p3 #6: Wed Jul 15 01:49:29 BRT 2015  root@myserver.domain:/usr/src/sys/amd64/compile/myserver  amd64
```


```
# /etc/rc.d/ldconfig restart
ELF ldconfig path: /lib /usr/lib /usr/lib/compat /usr/local/lib /usr/local/lib/libnet11 /usr/local/lib/mysql
ldconfig: /usr/local/lib: ignoring world-writable directory
32-bit compatibility ldconfig path: /usr/lib32
```

And I can't install it from ports, it only installs from pkg install -Rf samba36.


```
# portmaster -w -r samba36
(..)
checking for cap_get_proc... no
checking for cap_get_proc in -lcap... no
checking for POSIX capabilities... no
checking for int16 typedef included by rpc/rpc.h... no
checking for uint16 typedef included by rpc/rpc.h... no
checking for int32 typedef included by rpc/rpc.h... no
checking for uint32 typedef included by rpc/rpc.h... no
checking for conflicting AUTH_ERROR define in rpc/rpc.h... no
checking for test routines... configure: error: cant find test code. Aborting config
===>  Script "configure" failed unexpectedly.
Please report the problem to timur@FreeBSD.org [maintainer] and attach the
"/usr/ports/net/samba36/work/samba-3.6.25/source3/config.log" including the
output of the failure of your make command. Also, it might be a good idea to
provide an overview of all packages installed on your system (e.g. a
/usr/local/sbin/pkg-static info -g -Ea).
*** [do-configure] Error code 1

Stop in /usr/ports/net/samba36.
*** [build] Error code 1

Stop in /usr/ports/net/samba36.

===>>> make build failed for net/samba36
===>>> Aborting update

===>>> Update for samba36-3.6.25 failed
===>>> Aborting update

===>>> You can restart from the point of failure with this command line:
  portmaster <flags> net/samba36
```


----------



## talsamon (Jul 15, 2015)

> On December 31, 2014, FreeBSD 9.1 and 9.2 will reach their end-of-life
> and will no longer be supported by the FreeBSD Security Team.



http://lists.freebsd.org/pipermail/freebsd-announce/2014-October/001586.html


----------



## francisco (Jul 15, 2015)

For the records:

About the "Shared object xxx.so not found, required by yyy.so"

I found that my /usr/local/lib was "world writable".


```
# /etc/rc.d/ldconfig restart

ldconfig: /usr/local/lib: ignoring world-writable directory
```

So I corrected permissions and the error was gone!!


```
#chmod 744 /usr/local/lib
```


----------



## talsamon (Jul 15, 2015)

> ldconfig: /usr/local/lib: ignoring world-writable directory



I don't know if that change anything, but:


```
ls -al /usr/local/lib
drwxr-xr-x  128 root  wheel  98304 15 Jul 00:08 lib
```

the permissions are 755.


----------



## talsamon (Jul 15, 2015)

Nearly at the same time....


----------

