auly
(Auly)
May 19, 2023, 11:36am
1
When I run
FROM gcc:13.1.0
RUN apt-get -qq update
RUN apt-get -qq upgrade
RUN apt-get -qq -y install cmake
RUN apt-get install -y libboost-all-dev
RUN apt-get -qq install build-essential libtcmalloc-minimal4 && \
ln -s /usr/lib/libtcmalloc_minimal.so.4 /usr/lib/libtcmalloc_minimal.so
I have an error:
#0 109.5 Errors were encountered while processing:
#0 109.5 gfortran
#0 109.5 libcoarrays-dev:amd64
#0 109.5 libcoarrays-openmpi-dev:amd64
#0 109.5 E: Sub-process /usr/bin/dpkg returned an error code (1)
How can I fix it?
rimelek
(Ákos Takács)
May 20, 2023, 10:23pm
2
I think you have the same issue but with a newer image.
opened 09:26AM - 05 Jun 19 UTC
closed 09:03PM - 05 Jun 19 UTC
Issue
Hi,
I would like to use gcc:9.1.0 image to rebuild some code.
When building on… top of gcc:9.1.0 when I try to install for install libblas-dev
I run into trouble:
Setting up gfortran (4:6.3.0-4) ...
update-alternatives: error: alternative path /usr/bin/gfortran doesn't exist
dpkg: error processing package gfortran (--configure):
subprocess installed post-installation script returned error exit status 2
Errors were encountered while processing:
gfortran
E: Sub-process /usr/bin/dpkg returned an error code (1)
It seems that gfortran is actually not installed in the image...
They say if you need gfortran you should use a debian image as base instead of gcc.
auly
(Auly)
May 21, 2023, 10:49am
3
I fix it but do not change gcc. I change the code from RUN apt-get install -y libboost-all-dev to RUN apt-get install -y libboost-all-dev --no-install-recommends. It works.
Ákos Takács via Docker Community Forums <notifications@docker.discoursemail.com > 于2023年5月21日周日 06:23写道:
rimelek
(Ákos Takács)
May 21, 2023, 11:00am
4
Thank you for reporting back. Yes, --no-install-recommends
is recommended to use in Dockerfile. I didn’t notice the lack of it. Good that you found it out and even better that it helped.
auly
(Auly)
May 24, 2023, 12:51pm
5
Are you also learning web server and APIs? If so, I hope to communicate some questions with you.
Ákos Takács via Docker Community Forums <notifications@docker.discoursemail.com > 于2023年5月21日周日 19:00写道:
rimelek
(Ákos Takács)
May 25, 2023, 7:06am
6
No, I am not learning that.