Reputation: 4672
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?
Upvotes: 0
Views: 3289
Reputation: 31299
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.
Upvotes: 2