Unable to load dynamic library memcached.so


At the moment the memcached extension isn’t loaded anymore for at least PHP versions 7.1, 7.2 & 7.3. I believe this suddenly has stopped working for an unknown reason. I haven’t pinpointed the exact time when this happened because of the sheer large amount of builds for the library.

If you look at the following build you’ll see that all are reporting “Unable to load dynamic library memcached.so”: https://travis-ci.org/laravel/framework/builds/491357145

Here’s our Travis setup: https://github.com/laravel/framework/blob/5.7/.travis.yml
We’re using Xenial as dist.

We’re enabling the memcached extension as described in the docs here (which has always worked in the past): https://github.com/laravel/framework/blob/7725e6434206e086a9d67ed86728f8832be4192b/.travis.yml#L32

Because of this our Memcached tests are being skipped. We’ve enabled skipping to allow tests to still run locally even if you don’t have Memcached installed on your local machine.

If you look at the following build where we install memcached ourselves with PECL, all works as expected: https://travis-ci.org/laravel/framework/builds/491620024


We built the 7.3.1 archive 4 days ago, and it is complaining about the header file memcached.h https://travis-ci.org/travis-ci/php-src-builder/jobs/490240941#L5230. It appears that ./configure did not (does not?) exit with nonzero status upon error, so we continued with the rest of the build.

Could you try specifying 7.3.0 to see if that works for you?


And similarly for 7.2.15 https://travis-ci.org/travis-ci/php-src-builder/jobs/490418245#L3708


Just to post a +1 complaint… we had to revert to Trusty as a quick fix to stop all builds from failing, and we’re hesitant to add a workaround for PECL installation.


@BanzaiMan same issue for 7.2.14 & 7.3.0: https://travis-ci.org/laravel/framework/builds/491694865


Btw unrelated but I see these errors popping up a lot as well lately. Seems Travis has problems with pre-installing PHP versions sometimes: https://travis-ci.org/laravel/framework/jobs/491694867


Hitting this issue as well. Seems ok for the PHP 7.1 Xenial build, but not the PHPS 7.2.


We’re also hitting this for PHP 7.1 on Xenial although the error message is slightly different: https://travis-ci.org/laravel/framework/jobs/491694866#L478


Recently we changed the way we ensure that libmemcached is installed; see


I thought that Xenial’s package was good enough, but apparently I was wrong.

I’ll look at fixing the process.


@BanzaiMan thanks for looking into this! :slight_smile:


Now, something wants a libsodium version (<1.0.8) https://travis-ci.org/travis-ci/php-src-builder/jobs/491742270#L2791


Using 1.0.7 doesn’t seem to work, either.



I’m rebuilding:

The ones that have passed already should have libmemcached.so in the archive; e.g.,

$ curl -sSfLO https://s3.amazonaws.com/travis-php-archives/binaries/ubuntu/16.04/x86_64/php-7.2.14.tar.bz2
$ tar tzvf php-7.2.14.tar.bz2 | grep memcached\.so
lrwxrwxrwx  0 travis travis       0 Feb 11 16:04 home/travis/.phpenv/versions/7.2.14/lib/libmemcached.so -> libmemcached.so.11.0.0
lrwxrwxrwx  0 travis travis       0 Feb 11 16:04 home/travis/.phpenv/versions/7.2.14/lib/libmemcached.so.11 -> libmemcached.so.11.0.0
-rwxr-xr-x  0 travis travis 1373704 Feb 11 16:04 home/travis/.phpenv/versions/7.2.14/lib/libmemcached.so.11.0.0
-rwxr-xr-x  0 travis travis  504456 Feb 11 16:04 home/travis/.phpenv/versions/7.2.14/lib/php/extensions/no-debug-zts-20170718/memcached.so

I’ll keep an eye on these jobs and restart them if they fail for transient errors.

If your archive has been built and still showing problems, do let me know.


All the archives should now have this file.


@BanzaiMan Looks like everything works again. Thanks for all your help! :slight_smile: