Error on installation with libcouchbase2-libevent

Hi there,

We are running PHP 7.4 docker image, our current PHP SDK version is 2.6.2, and couchbase client is 2.10.6. I want to upgrade the PHP version to 8.3 but can’t upgrade CB to 7.0 yet. When I tried to rebuild the docker image with the command below, I got error. Does anyone know what I need to change to be able to download that? Thank you.

I also tried with 8.0, 8.1, an another 7.4 php official images, they all got this error.

Command:

RUN ldconfig && \
    curl -O https://packages.couchbase.com/clients/c/libcouchbase-2.10.6_debian10_buster_amd64.tar && \
    tar xf libcouchbase-2.10.6_debian10_buster_amd64.tar && \
    cd libcouchbase-2.10.6_debian10_buster_amd64 && \
    apt install ./libcouchbase2-core_2.10.6-1_amd64.deb && \
    apt install ./libcouchbase-dev_2.10.6-1_amd64.deb && \
    apt install ./libcouchbase2-libevent_2.10.6-1_amd64.deb && \
    cd /tmp && \
    curl -LO https://github.com/couchbase/php-couchbase/archive/v2.6.2.tar.gz && \
    tar -zxf v2.6.2.tar.gz && \
    cd  php-couchbase-2.6.2 && \
    phpize && ./configure --with-couchbase && \
    make && make install

Error on apt install ./libcouchbase2-libevent_2.10.6-1_amd64.deb && \

3.939 The following packages have unmet dependencies:
3.981  libcouchbase2-libevent : Depends: libevent-core-2.1-6 (>= 2.1.8-stable) but it is not installable

The error message indicates that libcouchbase2-libevent has unmet dependencies, specifically libevent-core-2.1-6 (>= 2.1.8-stable). This suggests that the version of libevent-core required by libcouchbase2-libevent is not available in the repositories or is not compatible with your current setup.

Here are a few steps you can take to resolve this issue:

  • Check Package Availability: Verify if libevent-core-2.1-6 (>= 2.1.8-stable) is available in the repositories you’re using. It’s possible that it might be available in a different repository or under a slightly different package name.

  • Update Repository Lists: Sometimes, package repositories might not be up to date. You can try updating the repository lists before installing the package. Add apt update before the apt install commands to ensure you have the latest package information.

  • Alternative Installation Method: If the required package version is not available in your current repositories, you might need to install it manually or add additional repositories where it is available.

  • Consider Compatibility: Ensure that the versions of libcouchbase and its dependencies are compatible with PHP 8.3. Sometimes, libraries may not be compatible with newer versions of PHP Official Website immediately after their release.

  • Check Couchbase Documentation: Refer to the Couchbase documentation or release notes to see if there are any specific instructions or requirements for installing libcouchbase with PHP 8.3.

  • Community Support: Utilize forums or community support channels related to Couchbase or PHP. Sometimes, other users might have encountered similar issues and can provide insights or solutions.

Once you’ve resolved the dependency issue, you should be able to proceed with upgrading your PHP version to 8.3 within your Docker image.

this is pretty old version of PHP SDK. When it was released (in February 2020), there no PHP 8.0 yet (8.0.0 was released in November 2020). So I would say that it is unlikely that you will be able to compile it with PHP 8.0 easily.

I would recommend to track and update your dependencies on a regular basis.

This topic was automatically closed after 90 days. New replies are no longer allowed.