# Unable to load dynamic library memcached.so

**URL:** https://travis-ci.community/t/unable-to-load-dynamic-library-memcached-so/2232
**Category:** PHP
**Created:** [February 11, 2019, 1:19pm UTC](https://travis-ci.community/t/unable-to-load-dynamic-library-memcached-so/2232 "2019-02-11T13:19:33Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![driesvints](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/driesvints/32/3360_2.png) [@driesvints](https://travis-ci.community/u/driesvints)
#### Post date: [February 11, 2019, 1:19pm UTC](https://travis-ci.community/t/unable-to-load-dynamic-library-memcached-so/2232/1 "2019-02-11T13:19:33Z")

</div>

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](https://travis-ci.org/laravel/framework/builds/491357145)

Here’s our Travis setup: [https://github.com/laravel/framework/blob/5.7/.travis.yml](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](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](https://travis-ci.org/laravel/framework/builds/491620024)

---

<div class="post-metadata">

### Author: ![BanzaiMan](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/banzaiman/32/67_2.png) [@BanzaiMan](https://travis-ci.community/u/BanzaiMan)
#### Post date: [February 11, 2019, 1:47pm UTC](https://travis-ci.community/t/unable-to-load-dynamic-library-memcached-so/2232/2 "2019-02-11T13:47:46Z")

</div>

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](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?

---

<div class="post-metadata">

### Author: ![BanzaiMan](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/banzaiman/32/67_2.png) [@BanzaiMan](https://travis-ci.community/u/BanzaiMan)
#### Post date: [February 11, 2019, 1:49pm UTC](https://travis-ci.community/t/unable-to-load-dynamic-library-memcached-so/2232/3 "2019-02-11T13:49:36Z")

</div>

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

---

<div class="post-metadata">

### Author: ![maksimovic](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/maksimovic/32/4122_2.png) [@maksimovic](https://travis-ci.community/u/maksimovic)
#### Post date: [February 11, 2019, 2:51pm UTC](https://travis-ci.community/t/unable-to-load-dynamic-library-memcached-so/2232/4 "2019-02-11T14:51:43Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![driesvints](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/driesvints/32/3360_2.png) [@driesvints](https://travis-ci.community/u/driesvints)
#### Post date: [February 11, 2019, 3:49pm UTC](https://travis-ci.community/t/unable-to-load-dynamic-library-memcached-so/2232/5 "2019-02-11T15:49:09Z")

</div>

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

---

<div class="post-metadata">

### Author: ![driesvints](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/driesvints/32/3360_2.png) [@driesvints](https://travis-ci.community/u/driesvints)
#### Post date: [February 11, 2019, 3:57pm UTC](https://travis-ci.community/t/unable-to-load-dynamic-library-memcached-so/2232/6 "2019-02-11T15:57:56Z")

</div>

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](https://travis-ci.org/laravel/framework/jobs/491694867)

---

<div class="post-metadata">

### Author: ![mikemadison13](https://avatars.discourse-cdn.com/v4/letter/m/e36b37/32.png) [@mikemadison13](https://travis-ci.community/u/mikemadison13)
#### Post date: [February 11, 2019, 4:33pm UTC](https://travis-ci.community/t/unable-to-load-dynamic-library-memcached-so/2232/7 "2019-02-11T16:33:59Z")

</div>

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

---

<div class="post-metadata">

### Author: ![driesvints](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/driesvints/32/3360_2.png) [@driesvints](https://travis-ci.community/u/driesvints)
#### Post date: [February 11, 2019, 4:46pm UTC](https://travis-ci.community/t/unable-to-load-dynamic-library-memcached-so/2232/8 "2019-02-11T16:46:14Z")

</div>

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](https://travis-ci.org/laravel/framework/jobs/491694866#L478)

---

<div class="post-metadata">

### Author: ![BanzaiMan](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/banzaiman/32/67_2.png) [@BanzaiMan](https://travis-ci.community/u/BanzaiMan)
#### Post date: [February 11, 2019, 5:17pm UTC](https://travis-ci.community/t/unable-to-load-dynamic-library-memcached-so/2232/9 "2019-02-11T17:17:42Z")

</div>

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

> [@No new PHP archives are available](https://travis-ci.community/t/no-new-php-archives-are-available/2002/6):
>
> Looks like [launchpad.net](http://launchpad.net) is having a problem. [https://travis-ci.org/travis-ci/php-src-builder/jobs/487462951#L3230](https://travis-ci.org/travis-ci/php-src-builder/jobs/487462951#L3230) +wget https://launchpad.net/libmemcached/1.0/1.0.18/+download/libmemcached-1.0.18.tar.gz --2019-02-01 15:20:06-- https://launchpad.net/libmemcached/1.0/1.0.18/+download/libmemcached-1.0.18.tar.gz Resolving launchpad.net (launchpad.net)... 91.189.89.222, 91.189.89.223, 2001:67c:1560:8003::8004, ... Connecting to launchpad.net (launchpad.net)|91.189.89.222|:443... connected. HTTP r…

and

> <https://github.com/travis-ci/php-src-builder/commit/8f386a0452aa02066579e26eaed3987551995332#diff-104838d5c2d251e90c3cb4fc9e1af5aa>

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

I’ll look at fixing the process.

---

<div class="post-metadata">

### Author: ![driesvints](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/driesvints/32/3360_2.png) [@driesvints](https://travis-ci.community/u/driesvints)
#### Post date: [February 11, 2019, 5:28pm UTC](https://travis-ci.community/t/unable-to-load-dynamic-library-memcached-so/2232/10 "2019-02-11T17:28:57Z")

</div>

@BanzaiMan thanks for looking into this! 🙂

---

<div class="post-metadata">

### Author: ![BanzaiMan](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/banzaiman/32/67_2.png) [@BanzaiMan](https://travis-ci.community/u/BanzaiMan)
#### Post date: [February 11, 2019, 5:39pm UTC](https://travis-ci.community/t/unable-to-load-dynamic-library-memcached-so/2232/11 "2019-02-11T17:39:25Z")

</div>

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

---

<div class="post-metadata">

### Author: ![BanzaiMan](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/banzaiman/32/67_2.png) [@BanzaiMan](https://travis-ci.community/u/BanzaiMan)
#### Post date: [February 11, 2019, 5:56pm UTC](https://travis-ci.community/t/unable-to-load-dynamic-library-memcached-so/2232/12 "2019-02-11T17:56:14Z")

</div>

~~Using 1.0.7 doesn’t seem to work, either.~~

~~[https://travis-ci.org/travis-ci/php-src-builder/jobs/491749303#L2700](https://travis-ci.org/travis-ci/php-src-builder/jobs/491749303#L2700)~~

---

<div class="post-metadata">

### Author: ![BanzaiMan](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/banzaiman/32/67_2.png) [@BanzaiMan](https://travis-ci.community/u/BanzaiMan)
#### Post date: [February 11, 2019, 9:15pm UTC](https://travis-ci.community/t/unable-to-load-dynamic-library-memcached-so/2232/13 "2019-02-11T21:15:25Z")

</div>

I’m rebuilding:

- 7.3.2 (7.3) [https://travis-ci.org/travis-ci/php-src-builder/builds/491850768](https://travis-ci.org/travis-ci/php-src-builder/builds/491850768)
- 7.3.1 [https://travis-ci.org/travis-ci/php-src-builder/builds/491850926](https://travis-ci.org/travis-ci/php-src-builder/builds/491850926)
- 7.3.0 [https://travis-ci.org/travis-ci/php-src-builder/builds/491850978](https://travis-ci.org/travis-ci/php-src-builder/builds/491850978)
- 7.2.15 (7.2) [https://travis-ci.org/travis-ci/php-src-builder/builds/491851212](https://travis-ci.org/travis-ci/php-src-builder/builds/491851212)
- 7.2.14 [https://travis-ci.org/travis-ci/php-src-builder/builds/491851297](https://travis-ci.org/travis-ci/php-src-builder/builds/491851297)
- 7.1.26 (7.1) [https://travis-ci.org/travis-ci/php-src-builder/builds/491839373](https://travis-ci.org/travis-ci/php-src-builder/builds/491839373)

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

```auto
$ 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.

---

<div class="post-metadata">

### Author: ![BanzaiMan](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/banzaiman/32/67_2.png) [@BanzaiMan](https://travis-ci.community/u/BanzaiMan)
#### Post date: [February 12, 2019, 2:11am UTC](https://travis-ci.community/t/unable-to-load-dynamic-library-memcached-so/2232/14 "2019-02-12T02:11:24Z")

</div>

All the archives should now have this file.

---

<div class="post-metadata">

### Author: ![driesvints](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/driesvints/32/3360_2.png) [@driesvints](https://travis-ci.community/u/driesvints)
#### Post date: [February 12, 2019, 10:43am UTC](https://travis-ci.community/t/unable-to-load-dynamic-library-memcached-so/2232/15 "2019-02-12T10:43:06Z")

</div>

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

[https://travis-ci.org/laravel/framework/builds/492091495](https://travis-ci.org/laravel/framework/builds/492091495)

---

<div class="post-metadata">

### Author: ![samdark](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/samdark/32/2309_2.png) [@samdark](https://travis-ci.community/u/samdark)
#### Post date: [July 23, 2019, 8:49am UTC](https://travis-ci.community/t/unable-to-load-dynamic-library-memcached-so/2232/16 "2019-07-23T08:49:53Z")

</div>

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

---

<div class="post-metadata">

### Author: ![voku](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/voku/32/3219_2.png) [@voku](https://travis-ci.community/u/voku)
#### Post date: [November 23, 2019, 12:16am UTC](https://travis-ci.community/t/unable-to-load-dynamic-library-memcached-so/2232/17 "2019-11-23T00:16:21Z")

</div>

Seems to be still a problem, or? [Travis CI - Test and Deploy with Confidence](https://travis-ci.org/mrclay/minify/jobs/615817708#L4424)

> 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

---

<div class="post-metadata">

### Author: ![BanzaiMan](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/banzaiman/32/67_2.png) [@BanzaiMan](https://travis-ci.community/u/BanzaiMan)
#### Post date: [November 23, 2019, 1:21am UTC](https://travis-ci.community/t/unable-to-load-dynamic-library-memcached-so/2232/18 "2019-11-23T01:21:36Z")

</div>

You are using [Trusty](https://travis-ci.org/mrclay/minify/jobs/615817708#L10), with an old PHP 7.0.25 binary that was compiled on [October 26 2017](https://travis-ci.org/mrclay/minify/jobs/615817708#L511). You should move to Xenial and/or Try a different, newer version of PHP.

---

<div class="post-metadata">

### Author: ![voku](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/voku/32/3219_2.png) [@voku](https://travis-ci.community/u/voku)
#### Post date: [November 23, 2019, 2:05am UTC](https://travis-ci.community/t/unable-to-load-dynamic-library-memcached-so/2232/19 "2019-11-23T02:05:17Z")

</div>

Thanks for the quick response. 🙂

Same problem with a newer php version: [Travis CI - Test and Deploy with Confidence](https://travis-ci.org/mrclay/minify/jobs/615835797#L4457) ([https://storage.googleapis.com/travis-ci-language-archives/php/binaries/ubuntu/14.04/x86\_64/php-7.3.tar.bz2](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://travis-ci.org/mrclay/minify/jobs/615849000#L4244) ([https://storage.googleapis.com/travis-ci-language-archives/php/binaries/ubuntu/16.04/x86\_64/php-7.3.tar.bz2](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

---

<div class="post-metadata">

### Author: ![BanzaiMan](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/banzaiman/32/67_2.png) [@BanzaiMan](https://travis-ci.community/u/BanzaiMan)
#### Post date: [November 23, 2019, 2:37am UTC](https://travis-ci.community/t/unable-to-load-dynamic-library-memcached-so/2232/20 "2019-11-23T02:37:06Z")

</div>

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

```auto
$ 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

```

[Next page](https://travis-ci.community/t/unable-to-load-dynamic-library-memcached-so/2232.md?page=2)
