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

and

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

I’ll look at fixing the process.

1 Like

@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.

https://travis-ci.org/travis-ci/php-src-builder/jobs/491749303#L2700

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:

https://travis-ci.org/laravel/framework/builds/492091495

1 Like

Seems the same issue present on PHP 5.6: https://travis-ci.org/yiisoft/yii2/jobs/562465329

Seems to be still a problem, or? Travis CI - Test and Deploy with Confidence

Warning: PHP Startup: Unable to load dynamic library ‘/home/travis/.phpenv/versions/7.0.25/lib/php/extensions/no-debug-zts-20151012/memcache.so’ - /home/travis/.phpenv/versions/7.0.25/lib/php/extensions/no-debug-zts-20151012/memcache.so: cannot open shared object file: No such file or directory in Unknown on line 0

PHP Warning: PHP Startup: Unable to load dynamic library ‘/home/travis/.phpenv/versions/7.0.25/lib/php/extensions/no-debug-zts-20151012/memcache.so’ - /home/travis/.phpenv/versions/7.0.25/lib/php/extensions/no-debug-zts-20151012/memcache.so: cannot open shared object file: No such file or directory in Unknown on line 0

Warning: PHP Startup: Unable to load dynamic library ‘/home/travis/.phpenv/versions/7.0.25/lib/php/extensions/no-debug-zts-20151012/memcache.so’ - /home/travis/.phpenv/versions/7.0.25/lib/php/extensions/no-debug-zts-20151012/memcache.so: cannot open shared object file: No such file or directory in Unknown on line 0

You are using Trusty, with an old PHP 7.0.25 binary that was compiled on October 26 2017. You should move to Xenial and/or Try a different, newer version of PHP.

Thanks for the quick response. :slightly_smiling_face:

Same problem with a newer php version: Travis CI - Test and Deploy with Confidence (https://storage.googleapis.com/travis-ci-language-archives/php/binaries/ubuntu/14.04/x86_64/php-7.3.tar.bz2)

Warning: PHP Startup: Unable to load dynamic library ‘memcache.so’ (tried: /home/travis/.phpenv/versions/7.3.9/lib/php/extensions/no-debug-zts-20180731/memcache.so (/home/travis/.phpenv/versions/7.3.9/lib/php/extensions/no-debug-zts-20180731/memcache.so: cannot open shared object file: No such file or directory), /home/travis/.phpenv/versions/7.3.9/lib/php/extensions/no-debug-zts-20180731/memcache.so.so (/home/travis/.phpenv/versions/7.3.9/lib/php/extensions/no-debug-zts-20180731/memcache.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0

And also with Travis CI - Test and Deploy with Confidence (https://storage.googleapis.com/travis-ci-language-archives/php/binaries/ubuntu/16.04/x86_64/php-7.3.tar.bz2)

Warning: PHP Startup: Unable to load dynamic library ‘memcache.so’ (tried: /home/travis/.phpenv/versions/7.3.11/lib/php/extensions/no-debug-zts-20180731/memcache.so (/home/travis/.phpenv/versions/7.3.11/lib/php/extensions/no-debug-zts-20180731/memcache.so: cannot open shared object file: No such file or directory), /home/travis/.phpenv/versions/7.3.11/lib/php/extensions/no-debug-zts-20180731/memcache.so.so (/home/travis/.phpenv/versions/7.3.11/lib/php/extensions/no-debug-zts-20180731/memcache.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0

Aren’t you supposed to look for memcached.so, not memcache.so?

$ curl -sSfL https://storage.googleapis.com/travis-ci-language-archives/php/binaries/ubuntu/16.04/x86_64/php-7.3.tar.bz2 | tar tvjf - | grep memcached\.so
lrwxrwxrwx  0 travis travis       0 Nov  6 07:45 home/travis/.phpenv/versions/7.3.11/lib/libmemcached.so -> libmemcached.so.11.0.0
lrwxrwxrwx  0 travis travis       0 Nov  6 07:45 home/travis/.phpenv/versions/7.3.11/lib/libmemcached.so.11 -> libmemcached.so.11.0.0
-rwxr-xr-x  0 travis travis 1373704 Nov  6 07:45 home/travis/.phpenv/versions/7.3.11/lib/libmemcached.so.11.0.0
-rwxr-xr-x  0 travis travis  511104 Nov  6 07:45 home/travis/.phpenv/versions/7.3.11/lib/php/extensions/no-debug-zts-20180731/memcached.so