E: Version '2.5.18+dfsg-2' for 'libldap-2.5-0' was not found #5234

Closed
opened 2026-02-21 18:10:00 -05:00 by yindo · 8 comments
Owner

Originally created by @imdevopx on GitHub (Aug 27, 2024).

Self Checks

  • This is only for bug report, if you would like to ask a question, please head to Discussions.
  • I have searched for existing issues search for existing issues, including closed ones.
  • I confirm that I am using English to submit this report (我已阅读并同意 Language Policy).
  • [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:)
  • Please do not modify this template :) and fill in all the required fields.

Dify version

0.7.0

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

docker build --file api-Dockerfile --tags dify-api:v0.7.1 .

✔️ Expected Behavior

successful build

Actual Behavior

unsuccessful build. E: Version '2.5.18+dfsg-2' for 'libldap-2.5-0' was not found

Originally created by @imdevopx on GitHub (Aug 27, 2024). ### Self Checks - [X] This is only for bug report, if you would like to ask a question, please head to [Discussions](https://github.com/langgenius/dify/discussions/categories/general). - [X] I have searched for existing issues [search for existing issues](https://github.com/langgenius/dify/issues), including closed ones. - [X] I confirm that I am using English to submit this report (我已阅读并同意 [Language Policy](https://github.com/langgenius/dify/issues/1542)). - [X] [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:) - [X] Please do not modify this template :) and fill in all the required fields. ### Dify version 0.7.0 ### Cloud or Self Hosted Self Hosted (Docker) ### Steps to reproduce docker build --file api-Dockerfile --tags dify-api:v0.7.1 . ### ✔️ Expected Behavior successful build ### ❌ Actual Behavior unsuccessful build. E: Version '2.5.18+dfsg-2' for 'libldap-2.5-0' was not found
yindo added the 🤔 cant-reproducedependencies labels 2026-02-21 18:10:00 -05:00
yindo closed this issue 2026-02-21 18:10:00 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Aug 27, 2024):

I found a similar issue that might help you resolve the error "E: Version '2.5.18+dfsg-2' for 'libldap-2.5-0' was not found" when building the Docker image for Dify version 0.7.0. The error indicates that the specified version of libldap-2.5-0 is not available in the current repositories.

To resolve this, you can modify the Dockerfile to install the available version of libldap-2.5-0 without specifying the exact version. Here is the modified section of the Dockerfile:

RUN apt-get update \
    && apt-get install -y --no-install-recommends curl nodejs libgmp-dev libmpfr-dev libmpc-dev \
    && echo "deb http://deb.debian.org/debian testing main" > /etc/apt/sources.list \
    && apt-get update \
    # For Security
    && apt-get install -y --no-install-recommends zlib1g=1:1.3.dfsg+really1.3.1-1 expat=2.6.2-1 libldap-2.5-0 perl=5.38.2-5 libsqlite3-0=3.46.0-1 \
    && apt-get autoremove -y \
    && rm -rf /var/lib/apt/lists/*

By removing the specific version 2.5.18+dfsg-2 for libldap-2.5-0, the package manager will install the latest available version from the repository. This should resolve the error and allow the Docker image to build successfully [1].

To continue talking to Dosu, mention @dosu.

@dosubot[bot] commented on GitHub (Aug 27, 2024): <!-- Answer --> I found a similar issue that might help you resolve the error "E: Version '2.5.18+dfsg-2' for 'libldap-2.5-0' was not found" when building the Docker image for Dify version 0.7.0. The error indicates that the specified version of `libldap-2.5-0` is not available in the current repositories. To resolve this, you can modify the Dockerfile to install the available version of `libldap-2.5-0` without specifying the exact version. Here is the modified section of the Dockerfile: ```dockerfile RUN apt-get update \ && apt-get install -y --no-install-recommends curl nodejs libgmp-dev libmpfr-dev libmpc-dev \ && echo "deb http://deb.debian.org/debian testing main" > /etc/apt/sources.list \ && apt-get update \ # For Security && apt-get install -y --no-install-recommends zlib1g=1:1.3.dfsg+really1.3.1-1 expat=2.6.2-1 libldap-2.5-0 perl=5.38.2-5 libsqlite3-0=3.46.0-1 \ && apt-get autoremove -y \ && rm -rf /var/lib/apt/lists/* ``` By removing the specific version `2.5.18+dfsg-2` for `libldap-2.5-0`, the package manager will install the latest available version from the repository. This should resolve the error and allow the Docker image to build successfully <sup>[[1]](https://github.com/langgenius/dify/blob/main/api/Dockerfile)</sup>. <!-- Dosu Comment Footer --> *To continue talking to [Dosu](https://dosu.dev), mention @dosu.*
Author
Owner

@crazywoola commented on GitHub (Aug 27, 2024):

We can not reproduce this as it's already v0.7.2.

Maybe you can provide more details.

@crazywoola commented on GitHub (Aug 27, 2024): We can not reproduce this as it's already v0.7.2. Maybe you can provide more details.
Author
Owner

@imdevopx commented on GitHub (Aug 27, 2024):

@crazywoola hmmm i even manually installed in on my ubuntu 22 server.. and still not found, however i tried to remove the specific version and seems it is working now.
image

@imdevopx commented on GitHub (Aug 27, 2024): @crazywoola hmmm i even manually installed in on my ubuntu 22 server.. and still not found, however i tried to remove the specific version and seems it is working now. <img width="650" alt="image" src="https://github.com/user-attachments/assets/d40aa553-48b0-463a-b7bb-d5b89b9ef419">
Author
Owner

@crazywoola commented on GitHub (Aug 27, 2024):

I guess it's resolved?

@crazywoola commented on GitHub (Aug 27, 2024): I guess it's resolved?
Author
Owner

@imdevopx commented on GitHub (Aug 27, 2024):

yes, but yeah i tried @dosu suggestions and works. not sure why you guys can still install that specific version and mine won't. it doesn't matter if i have different libldap-2.5-0 version? seems mine is 2.5.18+dfsg-0ubuntu0.22.04.2.

@imdevopx commented on GitHub (Aug 27, 2024): yes, but yeah i tried @dosu suggestions and works. not sure why you guys can still install that specific version and mine won't. it doesn't matter if i have different libldap-2.5-0 version? seems mine is 2.5.18+dfsg-0ubuntu0.22.04.2.
Author
Owner

@dosubot[bot] commented on GitHub (Aug 27, 2024):

It's good to hear that the issue is resolved by removing the specific version constraint for libldap-2.5-0. The version discrepancy likely stems from differences in the package repositories or the specific Ubuntu release you are using. As long as the installed version of libldap-2.5-0 meets the application's requirements, it should not matter if the version differs slightly. This approach ensures compatibility and avoids issues with unavailable package versions.

To continue talking to Dosu, mention @dosu.

@dosubot[bot] commented on GitHub (Aug 27, 2024): <!-- Answer --> It's good to hear that the issue is resolved by removing the specific version constraint for `libldap-2.5-0`. The version discrepancy likely stems from differences in the package repositories or the specific Ubuntu release you are using. As long as the installed version of `libldap-2.5-0` meets the application's requirements, it should not matter if the version differs slightly. This approach ensures compatibility and avoids issues with unavailable package versions. <!-- Dosu Comment Footer --> *To continue talking to [Dosu](https://dosu.dev), mention @dosu.*
Author
Owner

@jhlia0 commented on GitHub (Aug 27, 2024):

Update to libldap-2.5-0=2.5.18+dfsg-3 can solve this problem.

https://packages.debian.org/zh-cn/testing/libldap-dev

@jhlia0 commented on GitHub (Aug 27, 2024): Update to libldap-2.5-0=2.5.18+dfsg-3 can solve this problem. https://packages.debian.org/zh-cn/testing/libldap-dev
Author
Owner

@imdevopx commented on GitHub (Aug 27, 2024):

seems working fine on my end now.. thank you all

@imdevopx commented on GitHub (Aug 27, 2024): seems working fine on my end now.. thank you all
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#5234