I am trying to build the project on Windows and I am using Docker for Windows but when I run the command docker-compose build I get the following error:
libltdl-dev_2.4.6-0.1_amd64.deb Hash Sum mismatch E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
ERROR: Service 'web' failed to build: The command '/bin/sh -c apt-get install -y
I tried several different solutions like reinstalling the Docker, using older Docker versions, I tried modifying the Dockerfile in the project, I tried switching to different branches of the project. As far as I know, this is a Windows issue, this does not apply to other operating systems.
Any suggestion what should I do next?
Related
I am trying to setup a container using laradock with the following command:
docker-compose up -d nginx mysql
The problem is I am getting the following error:
E: There were unauthenticated packages and -y was used without --allow-unauthenticated
ERROR: Service 'workspace' failed to build: The command '/bin/sh -c apt-get update -yqq && apt-get -yqq install nasm' returned a non-zero code: 100`
Is there a way to get it to use yum instead of apt-get?
(I'm a server noob, thought docker would be easy and it seems that it is. Just can't figure out why it's trying to use apt-get instead of yum. Thanks.)
I suggest to read about the problems with different package system: Getting apt-get on an alpine container
Most official docker images are available with different version of Linux (alpine, debian, cent). I would rather create a own Dockerfile and change "FROM x:y" than use different package systems.
But, read the linked comment.
I have been learning docker using the docker docs, and first encountered a problem in the quick start guide to Django. The program would build normally up until the the second to last command. Here is my dockerfile and the output:
FROM python:3.5.2
ENV PYTHONUNBUFFERED 1
WORKDIR /code
ADD requirements.txt /code
RUN pip3 install -r requirements.txt
ADD . /code
Then when I run:
docker-compose run web django-admin startproject src .
I get the whole thing built and then it hangs:
Installing collected packages: Django, psycopg2
Running setup.py install for psycopg2: started
Running setup.py install for psycopg2: finished with status 'done'
Successfully installed Django-1.10.5 psycopg2-2.6.2
So since I don't have experience with compose I tried the most basic docker build that included a dockerfile. This one also got hung up.
FROM docker/whalesay:latest
RUN apt-get -y update && apt-get install -y fortunes
CMD /usr/games/fortune -a | cowsay
And this is the last terminal line before the hang.
Processing triggers for libc-bin (2.19-0ubuntu6.6) ...
According to the tutorial this occurs in the same spot. The second to last command, which happens to also be RUN.
Processing triggers for libc-bin (2.19-0ubuntu6.6) ...
---> dfaf993d4a2e
Removing intermediate container 05d4eda04526
[END RUN COMMAND]
So thats why I think its in the RUN command, but I'm not sure why or how to fix it. Does anyone know why this might be occurring? I am using a Macbook Pro 8.1 running OSX EL CAPITIAN version 10.11.6 and Docker version 1.13.1, build 092cba3
I am attempting to install SWI-Prolog on a server running rhel 7.
I have followed the instructions to build SWI-Prolog here: http://www.swi-prolog.org/build/Redhat.html. The build completes without error; however, I see no trace of the application.
In addition, the application does not seem accessible because I am unable to invoke swipl to begin executing Prolog commands.
I'm on Fedora 24, so probably close to your RHEL 7 situation. I never build the RPM, I simply build from sources:
git clone https://github.com/SWI-Prolog/swipl-devel
cd swipl-devel
cp build.tmpl build
<EDITOR> build <TO CUSTOMIZE>
./build
In the customization step you can set a specific directory on your system. That way you're 100% sure where it ends up.
I followed SWIPL build instructions on my CentOS 7.6.1810.
I faced two issues when configuring using cmake as per instructions
cmake ..
First, I had to install cmake3
yum install cmake3
and had to invoke it thus:
cmake3 ..
Secondly, cmake had trouble setting X11_Xpm_LIB. So I manually set the line in CMakeCache.txt
X11_Xpm_LIB:FILEPATH=/usr/lib64/libXpm.so.4
After this the config process completed successfully.
But my build is failing :(
I would like to install the dependencies for Visual C++ for Linux Development, namely openssh-server, g++, gdb and gdbserver in a docker container.
I run a docker container based on an Ubuntu image I have tried ubuntu:14.04, ubuntu:12.04 and ubuntu:latest. I am running the container in interactive mode and using bash to attempt to install the dependencies.
The Visual C++ for Linux page linked above suggests that the dependencies can be installed with...
sudo apt-get install openssh-server g++ gdb gdbserver
However I'm having trouble installing them. For instance when I attempt to install gdb I get an error stating that the package could not be found...
root#f6de8c642ffa:/# apt-get install gdb
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package gdb
I have also tried prefixing with sudo without luck. I get similar errors for the other packages, except for g++ which I believe installed.
I'm presuming that these tools for C++ development can be used with a docker container. I'm new to both Linux and docker though.
How do I get these tools installed in an Ubuntu docker container?
You probably need to do an apt-get update first - these packages have probably been updated (and thus their explicit package versions have changed) since the source list in your container was written (when the image was created, not when the container was instantiated).
Once you update, apt-get install ... should be able to install them.
I installed ubuntu 14.04 virtual machine and run docker(1.11.2). I try to build sample image (here).
docker file :
FROM java:8
# Install maven
RUN apt-get update
RUN apt-get install -y maven
....
I get following error:
Step 3: RUN apt-get update
--> Using cache
--->64345sdd332
Step 4: RUN apt-get install -y maven
---> Running in a6c1d5d54b7a
Reading package lists...
Reading dependency tree...
Reading state information...
E: Unable to locate package maven
INFO[0029] The command [/bin/sh -c apt-get install -y maven] returned a non-zero code:100
following solutions I have tried, but no success.
restarted docker here
run as apt-get -qq -y install curl here :same error :(
how can i view detailed error message ?
a
any way to fix the issue?
you may need to update os inside docker before
try to run apt-get update first, then apt-get install xxx
The cached result of the apt-get update may be very stale. Redesign the package pull according to the Docker best practices:
FROM java:8
# Install maven
RUN apt-get update \
&& DEBIAN_FRONTEND=noninteractive \
apt-get install -y maven \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
Based on similar issues I had, you want to both look at possible network issues and possible image related issues.
Network issues : you are already looking at proxy related stuff. Make sure also the iptables setup done automatically by docker has not been messed up unintentionnaly by yourself or another application. Typically, if another docker container runs with a net=host option, this can cause trouble.
Image issues : The distro you are running on in your container is not Ubuntu 14.04 but the one that java:8 was built from. If you took the java image from official library on docker hub, you have a hierarchy of images coming initially from Debian jessie. You might want to look the different Dockerfile in this hierarchy to find out where the repo setup is not the one you are looking at.
For both situations, to debug this, I recommand you run inside the latest image a shell to look the actual network and repo situation in your image. In your case
docker run -ti --rm 64345sdd332 /bin/bash
gives you a shell just before running your install maven command.
I am currently working behind proxy. it failed to download some dependency. for that you have to mention proxy configuration in docker file. ref
but, now I facing difficulty to run "mvn", "dependency:resolve" due to the proxy, maven itself block to download some dependency and build failed.
thanks buddies for your great support !
Execute 'apt-get update' and 'apt-get install' in a single RUN instruction. This is done to make sure that the latest packages will be installed. If 'apt-get install' were in a separate RUN instruction, then it would reuse a layer added by 'apt-get update', which could have been created a long time ago.
RUN apt-get update && \
apt-get install -y <tool..eg: maven>
Note: RUN instructions build your image by adding layers on top of the initial image.