我正在尝试在docker镜像上安装tesseract库,但是出现了错误。
我知道很多人已经问了同样的问题,并且我尝试了许多解决方案,但仍然出现错误。这里是Docker文件:
FROM python:3.7.6
RUN file="$(apt-get update && \
apt-get install -y apt-utils && \
apt-get install -y curl && \
apt-get update && \
apt-get install -y software-properties-common && \
apt-get update && \
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys A4BCBD87CEF9E52D && \ # this line added after search
add-apt-repository ppa:alex-p/tesseract-ocr -y )" && echo $file
RUN file = "$(apt-get update --allow-unauthenticated && \
apt install tesseract-ocr=4.1.1-1ppa1~xenial1 -y )" && echo "------ New line" && echo $file
输出结果:
Warning: apt-key output should not be parsed (stdout is not a terminal)
gpg: key A4BCBD87CEF9E52D: public key "Launchpad PPA for Alex_P" imported
gpg: Total number processed: 1
gpg: imported: 1
gpg: keybox '/tmp/tmpqo2rec69/pubring.gpg' created
gpg: /tmp/tmpqo2rec69/trustdb.gpg: trustdb created
gpg: key A4BCBD87CEF9E52D: public key "Launchpad PPA for Alex_P" imported
gpg: Total number processed: 1
gpg: imported: 1
Warning: apt-key output should not be parsed (stdout is not a terminal)
gpg: no valid OpenPGP data found.
然后它会打印一些已安装的库,接着会出现这个错误信息
step : RUN file = "$(apt-get update --allow-unauthenticated &&
apt install tesseract-ocr=4.1.1-1ppa1~xenial1 -y )" &&
echo "------ New line" && echo $file
---> Running in 8d364f24dfd9
E: The repository 'http://ppa.launchpad.net/alex-p/tesseract-ocr/ubuntu focal Release' does not have a Release file.
=: