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

golang 容器命令报错 #7

Open
mrgAndysm opened this issue Feb 10, 2022 · 5 comments
Open

golang 容器命令报错 #7

mrgAndysm opened this issue Feb 10, 2022 · 5 comments

Comments

@mrgAndysm
Copy link

stat: cannot statx '/usr/bin/screen': Operation not permitted
dpkg: error processing package screen (--configure):
installed screen package post-installation script subprocess returned error exit status 1
Processing triggers for libc-bin (2.31-13+deb11u2) ...
Errors were encountered while processing:
screen
E: Sub-process /usr/bin/dpkg returned an error code (1)
ERROR: Service 'golang' failed to build : The command '/bin/sh -c sed -i 's/deb.debian.org/mirrors.tuna.tsinghua.edu.cn/' /etc/apt/sources.list && sed -i 's/security.debian.org/mirrors.tuna.tsinghua.edu.cn/' /etc/apt/sources.list && sed -i 's/security-cdn.debian.org/mirrors.tuna.tsinghua.edu.cn/' /etc/apt/sources.list && apt-get update && apt-get upgrade -y && apt-get install -y --no-install-recommends curl zip unzip git vim screen' returned a non-zero code: 100

@nivin-studio
Copy link
Owner

stat: cannot statx '/usr/bin/screen': Operation not permitted dpkg: error processing package screen (--configure): installed screen package post-installation script subprocess returned error exit status 1 Processing triggers for libc-bin (2.31-13+deb11u2) ... Errors were encountered while processing: screen E: Sub-process /usr/bin/dpkg returned an error code (1) ERROR: Service 'golang' failed to build : The command '/bin/sh -c sed -i 's/deb.debian.org/mirrors.tuna.tsinghua.edu.cn/' /etc/apt/sources.list && sed -i 's/security.debian.org/mirrors.tuna.tsinghua.edu.cn/' /etc/apt/sources.list && sed -i 's/security-cdn.debian.org/mirrors.tuna.tsinghua.edu.cn/' /etc/apt/sources.list && apt-get update && apt-get upgrade -y && apt-get install -y --no-install-recommends curl zip unzip git vim screen' returned a non-zero code: 100

网络问题,换个网

@mrgAndysm
Copy link
Author

是网络问题,screen 安装不上

@nivin-studio
Copy link
Owner

是网络问题,screen 安装不上

那就修改golang容器的dockerfile,把screen删了,容器构建启动后,在进入容器里手动的安装screen

@mrgAndysm
Copy link
Author

解决了,谢万总

@shiyin-weng
Copy link

I had the same issue. And this can be resolved by specifying DNS server for docker container in my case.
Reference: https://stackoverflow.com/a/68199803

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants