Unable to load dynamic library memcached.so

Orion Tiller orion at blackboxconsortium.com
Thu Oct 13 00:33:34 UTC 2016


> I guess I miss something here: I have a jail with www/nginx and
> lang/php56 plus some extensions installed. Since I needed
> databases/pecl-memcached, I installed it with
>
>   $ pkg install databases/pecl-memcached
>
> When I restart php-fpm with
>
>   $ service php-fpm restart
>
> I get the following error:
>
>   [12-Oct-2016 23:06:54] NOTICE: PHP message: PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/local/lib/php/20131226/memcached.so' - /usr/local/lib/php/20131226/memcached.so: Undefined symbol "ps_globals" in Unknown on line 0
>
> Some quick research told me that I need to do
>
>   $ pkg install -Rf lang/php56
>
> which I did. This didn't help, same error. So I even did
>
>   $ pkg install -f
>
> but that was also without any success. Next, I ran
>
>   $ rm -rf /usr/local/lib/php/20131226
>
> and again
>
>   $ pkg install -f
>
> without any success. I thought: "Well, let's build it on your
> own" and built lang/php56 and databases/pecl-memcached with
> poudriere, installed it from my repository with
>
>   $ pkg install -Rfr <my-repo> lang/php56 databases/pecl-memcached
>
> and, well, this didn't work either. 
>
> This can't be so difficult. Probably it's too late. Maybe someone
> from another timezone can help. :-)
>
>     Niklaas
>
Not sure if this will help you here but I sometimes have an issue with
redis where if the line extension=session.so isn't loaded first before
the redis one in /usr/local/etc/php/extensions.ini I get a similar error
to the one you are seeing.  The pecl-memcached port also list these as
requirements php56-json-5.6.26
<https://www.freebsd.org/cgi/ports.cgi?query=%5Ephp56-json-5.6.26&stype=name>, php56-session-5.6.26
<https://www.freebsd.org/cgi/ports.cgi?query=%5Ephp56-session-5.6.26&stype=name>



More information about the freebsd-questions mailing list