Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/303.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/linux/26.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python 为什么google chrome没有安装在我的Dockerfile中_Python_Linux_Docker_Google Chrome - Fatal编程技术网

Python 为什么google chrome没有安装在我的Dockerfile中

Python 为什么google chrome没有安装在我的Dockerfile中,python,linux,docker,google-chrome,Python,Linux,Docker,Google Chrome,当我运行docker文件时,安装google chrome时出现了一个错误,如何修复它 docker文件的代码是 FROM python:3.8.5-slim-buster ENV PIP_NO_CACHE_DIR 1 RUN sed -i.bak 's/us-west-2\.ec2\.//' /etc/apt/sources.list # Installing Required Packages RUN apt update && apt upgrade -y &&am

当我运行docker文件时,安装google chrome时出现了一个错误,如何修复它 docker文件的代码是

FROM python:3.8.5-slim-buster
ENV PIP_NO_CACHE_DIR 1
RUN sed -i.bak 's/us-west-2\.ec2\.//' /etc/apt/sources.list
# Installing Required Packages
RUN apt update && apt upgrade -y && \
    apt install --no-install-recommends -y \
    chromium \
    util-linux \

# install google chrome
RUN wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
RUN apt install -y ./google-chrome-stable_current_amd64.deb 
错误是

Step 6/12 : RUN wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
 ---> Running in f4cf586966ff
--2020-07-25 18:12:05--  https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
Resolving dl.google.com (dl.google.com)... 172.217.13.238, 2607:f8b0:4004:809::200e
Connecting to dl.google.com (dl.google.com)|172.217.13.238|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 69649616 (66M) [application/x-debian-package]
Saving to: ‘google-chrome-stable_current_amd64.deb’
2020-07-25 18:12:07 (43.4 MB/s) - ‘google-chrome-stable_current_amd64.deb’ saved [69649616/69649616]
Removing intermediate container f4cf586966ff
 ---> 697b7e21efea
Step 7/12 : RUN apt install -y ./google-chrome-stable_current_amd64.deb
 ---> Running in 6e5858eb9f5d
WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
Reading package lists...
E: Unable to mkstemp /tmp/deb-file-google-chrome-stable_current_amd64.deb.K9fPKY - GetTempFile (2: No such file or directory)
E: The package lists or status file could not be parsed or opened.
The command '/bin/sh -c apt install -y ./google-chrome-stable_current_amd64.deb' returned a non-zero code: 100
如何解决这个问题


我试着用google chrome来运行selenium is any alternative ways for the

我相信正确的安装方法是:

dpkg-i./google-chrome-stable\u current\u amd64.deb