Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to build the Docker image because of the libmagic1 #13181

Closed
5 tasks done
laipz8200 opened this issue Feb 4, 2025 · 3 comments
Closed
5 tasks done

Failed to build the Docker image because of the libmagic1 #13181

laipz8200 opened this issue Feb 4, 2025 · 3 comments
Assignees
Labels
🐞 bug Something isn't working

Comments

@laipz8200
Copy link
Member

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

Cloud or Self Hosted

Self Hosted (Source)

Steps to reproduce

 > [production 2/7] 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     && apt-get install -y --no-install-recommends expat=2.6.4-1 libldap2=2.6.9+dfsg-1 perl=5.40.0-8 libsqlite3-0=3.46.1-1 zlib1g=1:1.3.dfsg+really1.3.1-1+b1     && apt-get install -y fonts-noto-cjk     && apt-get install -y libmagic1     && apt-get autoremove -y     && rm -rf /var/lib/apt/lists/*:
17.48 Reading state information...
17.58 Some packages could not be installed. This may mean that you have
17.58 requested an impossible situation or if you are using the unstable
17.58 distribution that some required packages have not yet been created
17.58 or been moved out of Incoming.
17.58 The following information may help to resolve the situation:
17.58 
17.58 The following packages have unmet dependencies:
17.69  libmagic1 : Depends: libmagic-mgc (= 1:5.44-3) but 1:5.45-3+b1 is to be installed
17.70 E: Unable to correct problems, you have held broken packages.
------
Dockerfile:51
--------------------
  50 |     
  51 | >>> RUN apt-get update \
  52 | >>>     && apt-get install -y --no-install-recommends curl nodejs libgmp-dev libmpfr-dev libmpc-dev \
  53 | >>>     # if you located in China, you can use aliyun mirror to speed up
  54 | >>>     # && echo "deb http://mirrors.aliyun.com/debian testing main" > /etc/apt/sources.list \
  55 | >>>     && echo "deb http://deb.debian.org/debian testing main" > /etc/apt/sources.list \
  56 | >>>     && apt-get update \
  57 | >>>     # For Security
  58 | >>>     && apt-get install -y --no-install-recommends expat=2.6.4-1 libldap2=2.6.9+dfsg-1 perl=5.40.0-8 libsqlite3-0=3.46.1-1 zlib1g=1:1.3.dfsg+really1.3.1-1+b1 \
  59 | >>>     # install a chinese font to support the use of tools like matplotlib
  60 | >>>     && apt-get install -y fonts-noto-cjk \
  61 | >>>     # install libmagic to support the use of python-magic guess MIMETYPE
  62 | >>>     && apt-get install -y libmagic1 \
  63 | >>>     && apt-get autoremove -y \
  64 | >>>     && rm -rf /var/lib/apt/lists/*
  65 |     
--------------------
ERROR: failed to solve: process "/bin/sh -c 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

See detailed log here

✔️ Expected Behavior

No response

❌ Actual Behavior

No response

@dosubot dosubot bot added the 🐞 bug Something isn't working label Feb 4, 2025
@laipz8200
Copy link
Member Author

I think we don't need the libmagic to detect the file's mime-type, maybe we can remove the related code and this library. refer to #13146.

@hjlarry
Copy link
Contributor

hjlarry commented Feb 4, 2025

I tested this PR #13176
It also resolved the libmagic error

@yihong0618
Copy link
Contributor

I think we don't need the libmagic to detect the file's mime-type, maybe we can remove the related code and this library. refer to #13146.

agree

@laipz8200 laipz8200 self-assigned this Feb 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐞 bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants