简体   繁体   中英

How to install libappindicator1 on Python of Docker image?

I'd like to install goole chrome on Python of Docker image. So, I need install libappindicator1 . However when I build this Dockerfile, I got error on libappindicator1

Dockerfile

FROM python:3.9

# Install manually all the missing libraries
RUN apt-get update
RUN apt-get install -y gconf-service libasound2 libatk1.0-0 libcairo2 libcups2 libfontconfig1 libgdk-pixbuf2.0-0 libgtk-3-0 libnspr4 libpango-1.0-0 libxss1 fonts-liberation libappindicator1 libnss3 lsb-release xdg-utils fonts-takao-*

# Install Chrome
RUN wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
RUN dpkg -i google-chrome-stable_current_amd64.deb; apt-get -fy install

Error message

E: Unable to locate package libappindicator1

How can I install libappindicator1 on Python of Docker image?

I solved this problem by modifying the python image tag.

python: 3.8 -> python: 3.8-buster

When I use python: 3.8-bullseye I got the same error. So this error seems to be related with Debian 10 (bullseye).

Note: buster is Debian 9

This is the reason, why Debian 10 (bullseye) can not install libappindicator1

5.3.1. Noteworthy obsolete packages

The deprecated libappindicator libraries are no longer provided. As a result, the related packages libappindicator1, libappindicator3-1 and libappindicator-dev are no longer available. This is expected to cause dependency errors for third-party software that still depends on libappindicator to provide system tray and indicator support.

What helped me with installing libappindicator1 on Debian and in Docker as well - is installing this package manually. Also, it depends on another one libindicator7 .

RUN curl -p --insecure "http://ftp.de.debian.org/debian/pool/main/liba/libappindicator/libappindicator1_0.4.92-7_amd64.deb" --output libappindicator1_0.4.92-8_amd64.deb \
    && curl -p --insecure "http://ftp.de.debian.org/debian/pool/main/libi/libindicator/libindicator7_0.5.0-4_amd64.deb" --output libindicator7_0.5.0-4_amd64.deb \
    && dpkg -i libindicator7_0.5.0-4_amd64.deb \
    && dpkg -i libappindicator1_0.4.92-8_amd64.deb \
    && rm libindicator7_0.5.0-4_amd64.deb \
    && rm libappindicator1_0.4.92-8_amd64.deb

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM