Ubuntu-20.04-lts docker 容器中的 Gcc-4.8
我正在尝试使用下面的 dockerfile 在 ubuntu-20.04 docker 映像中安装 gcc-4.8 。
# Pull base image.
FROM ubuntu:20.04
..............
...................
........................
## Get gcc 4.8.5 and build it
RUN wget http://mirror.keystealth.org/gnu/gcc/gcc-4.8.5/gcc-4.8.5.tar.gz \
&& tar xzf gcc-4.8.5.tar.gz && \
cd gcc-4.8.5 && \
./contrib/download_prerequisites && \
cd .. && mkdir gccbuild && cd gccbuild && \
../gcc-4.8.5/configure \
--prefix="/opt/gcc" \
--enable-shared --with-system-zlib --enable-threads=posix \
--enable-__cxa_atexit --enable-checking --enable-gnu-indirect-function \
--enable-languages="c,c++" --disable-bootstrap \
&& make all && make install
当我构建图像时,它显示以下错误消息。
--2022-03-03 10:52:56-- ftp://gcc.gnu.org/pub/gcc/infrastructure/mpfr-2.4.2.tar.bz2
=> 'mpfr-2.4.2.tar.bz2'
Resolving gcc.gnu.org (gcc.gnu.org)... 8.43.85.97, 2620:52:3:1:0:246e:9693:128c
Connecting to gcc.gnu.org (gcc.gnu.org)|8.43.85.97|:21... connected.
Logging in as anonymous ... Logged in!
==> SYST ... done. ==> PWD ... done.
==> TYPE I ... done. ==> CWD (1) /pub/gcc/infrastructure ... done.
==> SIZE mpfr-2.4.2.tar.bz2 ... 1077886
==> PASV ... couldn't connect to 10.88.55.69 port 53847: Connection timed out
Retrying.
由于 ftp 访问被我们组织的防火墙阻止。因此,我在 dockerfile
中没有 ftp 站点来下载 gcc-4.8.5,我不确定它从哪里尝试通过 ftp 连接嗯>。
有人可以帮我使用 dockerfile 安装 gcc-4.8 吗?
I'm trying to install gcc-4.8 in ubuntu-20.04 docker image using below dockerfile.
# Pull base image.
FROM ubuntu:20.04
..............
...................
........................
## Get gcc 4.8.5 and build it
RUN wget http://mirror.keystealth.org/gnu/gcc/gcc-4.8.5/gcc-4.8.5.tar.gz \
&& tar xzf gcc-4.8.5.tar.gz && \
cd gcc-4.8.5 && \
./contrib/download_prerequisites && \
cd .. && mkdir gccbuild && cd gccbuild && \
../gcc-4.8.5/configure \
--prefix="/opt/gcc" \
--enable-shared --with-system-zlib --enable-threads=posix \
--enable-__cxa_atexit --enable-checking --enable-gnu-indirect-function \
--enable-languages="c,c++" --disable-bootstrap \
&& make all && make install
When i build the image, it shows below error message.
--2022-03-03 10:52:56-- ftp://gcc.gnu.org/pub/gcc/infrastructure/mpfr-2.4.2.tar.bz2
=> 'mpfr-2.4.2.tar.bz2'
Resolving gcc.gnu.org (gcc.gnu.org)... 8.43.85.97, 2620:52:3:1:0:246e:9693:128c
Connecting to gcc.gnu.org (gcc.gnu.org)|8.43.85.97|:21... connected.
Logging in as anonymous ... Logged in!
==> SYST ... done. ==> PWD ... done.
==> TYPE I ... done. ==> CWD (1) /pub/gcc/infrastructure ... done.
==> SIZE mpfr-2.4.2.tar.bz2 ... 1077886
==> PASV ... couldn't connect to 10.88.55.69 port 53847: Connection timed out
Retrying.
Since ftp access is blocked at firewall in our organization. Hence i do not have ftp site in dockerfile
to download gcc-4.8.5, I'm not sure from where it is trying to connect via ftp.
Can someone help me to install gcc-4.8 using dockerfile?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论