# "Unable to load dynamic library ‘apcu.so’" error on PHP 8/nightly

**URL:** <https://travis-ci.community/t/unable-to-load-dynamic-library-apcu-so-error-on-php-8-nightly/10754>\
**Category:** PHP\
**Created:** [December 4, 2020, 7:11am UTC](https://travis-ci.community/t/unable-to-load-dynamic-library-apcu-so-error-on-php-8-nightly/10754 "2020-12-04T07:11:02Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![afbora](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/afbora/32/5758_2.png) [@afbora](https://travis-ci.community/u/afbora)\
**Post date:** [December 4, 2020, 7:11am UTC](https://travis-ci.community/t/unable-to-load-dynamic-library-apcu-so-error-on-php-8-nightly/10754/1 "2020-12-04T07:11:02Z")

</div>

Hi!

When i try to test PHP 8.0 or nightly or 8.0snapshot, i get the following error.  
Also, when i try to install apcu extension, it warns that it is already installed.  
PHP 7.3 and 7.4 works great!  
Btw all unit tests passed on local machine.

Do you have an idea about the solution?  
Should we wait a little longer for PHP 8?

**Error Output**

> Warning: PHP Startup: Unable to load dynamic library ‘apcu.so’ (tried: /home/travis/.phpenv/versions/8.0.0/lib/php/extensions/no-debug-zts-20200930/apcu.so (/home/travis/.phpenv/versions/8.0.0/lib/php/extensions/no-debug-zts-20200930/apcu.so: cannot open shared object file: No such file or directory), /home/travis/.phpenv/versions/8.0.0/lib/php/extensions/no-debug-zts

**Related Job**

> **[Travis CI - Test and Deploy with Confidence](https://app.travis-ci.com/github/getkirby/kirby/jobs/454055212)**
>
> Travis CI enables your team to test and ship your apps with confidence. Easily sync your projects with Travis CI and you'll be testing your code in minutes.

---

<div class="post-metadata">

**Author:** ![Montana](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/montana/32/9566_2.png) [@Montana](https://travis-ci.community/u/Montana)\
**Post date:** [December 4, 2020, 8:25am UTC](https://travis-ci.community/t/unable-to-load-dynamic-library-apcu-so-error-on-php-8-nightly/10754/2 "2020-12-04T08:25:46Z")

</div>

Hey @afbora,

I looked over the documentation it obviously works with PHP7, I’ll ask internally and see if I can’t get you an answer.

This link could also be a help to you:

> <https://github.com/krakjoe/apcu/blob/master/.travis.yml>

---

<div class="post-metadata">

**Author:** ![afbora](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/afbora/32/5758_2.png) [@afbora](https://travis-ci.community/u/afbora)\
**Post date:** [December 4, 2020, 9:16am UTC](https://travis-ci.community/t/unable-to-load-dynamic-library-apcu-so-error-on-php-8-nightly/10754/3 "2020-12-04T09:16:22Z")

</div>

Thank you @Montana. I would be very pleased.

---

<div class="post-metadata">

**Author:** ![Montana](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/montana/32/9566_2.png) [@Montana](https://travis-ci.community/u/Montana)\
**Post date:** [December 4, 2020, 11:26am UTC](https://travis-ci.community/t/unable-to-load-dynamic-library-apcu-so-error-on-php-8-nightly/10754/4 "2020-12-04T11:26:10Z")

</div>

After digging a bit, I found this build by krakjoe, (same repo I pointed you to) and it seems this person has `apcu.so` working on `nightly` and `8.0snapshot`. I would suggest going over their `.travis.yml` to see if there’s anything you missed out.

If that doesn’t work, please let me know.

> **[Travis CI - Test and Deploy Your Code with Confidence](https://travis-ci.org/github/krakjoe/apcu)**

---

<div class="post-metadata">

**Author:** ![afbora](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/afbora/32/5758_2.png) [@afbora](https://travis-ci.community/u/afbora)\
**Post date:** [December 4, 2020, 11:35am UTC](https://travis-ci.community/t/unable-to-load-dynamic-library-apcu-so-error-on-php-8-nightly/10754/5 "2020-12-04T11:35:46Z")

</div>

Thank you so much for digging @Montana

We have already started testing as PHP 8.0snapshot. It was working initially. Then suddenly it started giving this error.

**Here PHP 8.0snapshot job on forked repo**

> **[Travis CI - Test and Deploy with Confidence](https://travis-ci.com/github/afbora/kirby/builds/206550227)**

---

<div class="post-metadata">

**Author:** ![afbora](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/afbora/32/5758_2.png) [@afbora](https://travis-ci.community/u/afbora)\
**Post date:** [December 4, 2020, 11:41am UTC](https://travis-ci.community/t/unable-to-load-dynamic-library-apcu-so-error-on-php-8-nightly/10754/6 "2020-12-04T11:41:18Z")

</div>

PHP 8.0snapshot was working few days ago and here the job:

> **[Travis CI - Test and Deploy with Confidence](https://travis-ci.com/github/getkirby/kirby/builds/206063905)**

---

<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:** [December 4, 2020, 3:00pm UTC](https://travis-ci.community/t/unable-to-load-dynamic-library-apcu-so-error-on-php-8-nightly/10754/7 "2020-12-04T15:00:16Z")

</div>

Please see this:

> [@PHP 8.0 Missing](https://travis-ci.community/t/php-8-0-missing/10132/17):
>
> Sorry, the -q flag that I thought would do the trick is not recognized, so acpu and mongodb (maybe others?) were not actually installed on the archive. I’ve removed it and am now trying it again.

If the snapshot was working before, it should continue to work, by the way.

---

<div class="post-metadata">

**Author:** ![afbora](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/afbora/32/5758_2.png) [@afbora](https://travis-ci.community/u/afbora)\
**Post date:** [December 4, 2020, 5:12pm UTC](https://travis-ci.community/t/unable-to-load-dynamic-library-apcu-so-error-on-php-8-nightly/10754/8 "2020-12-04T17:12:07Z")

</div>

Thanks for reply @BanzaiMan Now is that fixed? I’m asking because your last commit test failed.

---

<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:** [December 4, 2020, 8:21pm UTC](https://travis-ci.community/t/unable-to-load-dynamic-library-apcu-so-error-on-php-8-nightly/10754/9 "2020-12-04T20:21:53Z")

</div>

Sorry about the continued problem. I’m still working on fixing it.

---

<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:** [December 4, 2020, 8:31pm UTC](https://travis-ci.community/t/unable-to-load-dynamic-library-apcu-so-error-on-php-8-nightly/10754/10 "2020-12-04T20:31:29Z")

</div>

OK, I’ve addressed the issues that I know of. Could you try again and report the result?

---

<div class="post-metadata">

**Author:** ![afbora](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/afbora/32/5758_2.png) [@afbora](https://travis-ci.community/u/afbora)\
**Post date:** [December 4, 2020, 8:37pm UTC](https://travis-ci.community/t/unable-to-load-dynamic-library-apcu-so-error-on-php-8-nightly/10754/11 "2020-12-04T20:37:06Z")

</div>

The test is now complete. Here the job results:

> **[Travis CI - Test and Deploy with Confidence](https://travis-ci.com/github/afbora/kirby/builds/206683004)**

---

<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:** [December 4, 2020, 8:52pm UTC](https://travis-ci.community/t/unable-to-load-dynamic-library-apcu-so-error-on-php-8-nightly/10754/12 "2020-12-04T20:52:11Z")

</div>

Does `php: 8.0.0` exhibit the same problem?

---

<div class="post-metadata">

**Author:** ![afbora](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/afbora/32/5758_2.png) [@afbora](https://travis-ci.community/u/afbora)\
**Post date:** [December 4, 2020, 8:57pm UTC](https://travis-ci.community/t/unable-to-load-dynamic-library-apcu-so-error-on-php-8-nightly/10754/13 "2020-12-04T20:57:25Z")

</div>

You right, the test passed on `PHP 8.0.0`

> **[Travis CI - Test and Deploy with Confidence](https://travis-ci.com/github/afbora/kirby/builds/206686294)**

---

<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:** [December 4, 2020, 8:58pm UTC](https://travis-ci.community/t/unable-to-load-dynamic-library-apcu-so-error-on-php-8-nightly/10754/14 "2020-12-04T20:58:22Z")

</div>

OK. I think we’ll just have to copy 8.0.0 archives to 8.0, so that’s a lot simpler. Sorry for the continued problem, but I think we are almost there.

That should be done now. `php: 8.0` should also work.

---

<div class="post-metadata">

**Author:** ![afbora](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/afbora/32/5758_2.png) [@afbora](https://travis-ci.community/u/afbora)\
**Post date:** [December 4, 2020, 9:19pm UTC](https://travis-ci.community/t/unable-to-load-dynamic-library-apcu-so-error-on-php-8-nightly/10754/15 "2020-12-04T21:19:26Z")

</div>

I have restart the last build. Now `PHP 8.0` gives a different error while others continue to fail. `8.0.0` is still passed. Am I missing something?

> **[Travis CI - Test and Deploy with Confidence](https://travis-ci.com/github/afbora/kirby/builds/206686294)**

---

<div class="post-metadata">

**Author:** ![afbora](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/afbora/32/5758_2.png) [@afbora](https://travis-ci.community/u/afbora)\
**Post date:** [December 4, 2020, 9:26pm UTC](https://travis-ci.community/t/unable-to-load-dynamic-library-apcu-so-error-on-php-8-nightly/10754/16 "2020-12-04T21:26:56Z")

</div>

I ran the new build to make sure the result is the same:

> **[Travis CI - Test and Deploy with Confidence](https://travis-ci.com/github/afbora/kirby/builds/206690186)**

---

<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:** [December 4, 2020, 9:57pm UTC](https://travis-ci.community/t/unable-to-load-dynamic-library-apcu-so-error-on-php-8-nightly/10754/17 "2020-12-04T21:57:59Z")

</div>

Oh, I see now. The `8.0` archive isn’t quite the same as the `8.0.0` archive. I’ll have to look at it again next week.

Please use 8.0.0 in the meantime.

---

<div class="post-metadata">

**Author:** ![afbora](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/afbora/32/5758_2.png) [@afbora](https://travis-ci.community/u/afbora)\
**Post date:** [December 4, 2020, 10:00pm UTC](https://travis-ci.community/t/unable-to-load-dynamic-library-apcu-so-error-on-php-8-nightly/10754/18 "2020-12-04T22:00:25Z")

</div>

I’m grateful for your support. Thank you.

---

<div class="post-metadata">

**Author:** ![afbora](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/afbora/32/5758_2.png) [@afbora](https://travis-ci.community/u/afbora)\
**Post date:** [December 7, 2020, 5:31pm UTC](https://travis-ci.community/t/unable-to-load-dynamic-library-apcu-so-error-on-php-8-nightly/10754/19 "2020-12-07T17:31:15Z")

</div>

@BanzaiMan recreated the `8.0` archive and works great now. Thanks!

---

<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:** [December 7, 2020, 7:51pm UTC](https://travis-ci.community/t/unable-to-load-dynamic-library-apcu-so-error-on-php-8-nightly/10754/20 "2020-12-07T19:51:01Z")

</div>

> **[Travis CI Documentation](https://docs.travis-ci.com/user/languages/php#nightly-builds)**
>
> Building a PHP project

As for “nightly”:

> Travis CI can test your PHP applications with a nightly PHP build, which includes PHPUnit and Composer, but does not include third-party PHP extensions:

[Next page](https://travis-ci.community/t/unable-to-load-dynamic-library-apcu-so-error-on-php-8-nightly/10754.md?page=2)
