Installing Docker on an isolated (no internet) Centos 7 box? - linux

I have an isolated box (no outside internet connection) that I need to install docker on. I downloaded the docker-engine-1.12.3-1.el7.centos.x86_64.rpm file from the Docker archives, and then copied it to the isolated box.
I then ran:
sudo yum localinstall --nogpgcheck docker-engine-1.12.3-1.el7.centos.x86_64.rpm
I get a failed install and this error multiple times:
https://yum.dockerproject.org/repo/main/centos/7/repodata/repomd.xml: [Errno 14] curl#7 - "Failed connect to yum.dockerproject.org:443; Connection refused"
Yum gives me the suggestion to the disable the repo, and that does not work either.
How do I correctly install Docker engine on an isolated CentOS 7 box?

Might be worth running rpm -q -R -p docker-engine-1.12.3-1.el7.centos.x86_64.rpm to find out what else you need to download.
– Mark Plotnick
I ran that and I have quite a list of things to download. … That fixed it. – user1566200

Related

Copy file from container to local filesystem

History:
My docker build file worked for years, without any problem, on my Linux Mint VM. When I needed to recreate the VM, I installed everything again, including docker.io.
I'm taking a beating with this error. I already verified that the final file is inside the docker image, but when I try to copy it to a directory external to the container, it says that it does not exist.
I followed the guidelines at Exploring Docker container's file system and verified that the file was in fact in the container.
Environment:
Linux Mint 19 (Tricia)
Docker installed by snap
Command:
docker cp {CONTAINER_ID}:/container_path /local_path
Problem:
stat /container_path: no such file or directory
The solution was simply to uninstall the docker by snap and install it again by apt. This solution still lacks more information, as it is not known if the problem was really caused by the version of the docker installed by snap.
sudo snap remove docker
sudo apt install docker.io

mysqlclient is not installing in python3.5 centos 7

mysqlclient is not installing in centos 7 and I attached the image where errors are shown so that you take idea from that. Your help is very appreciable for me.
Edit1 : #Jose
I tried your steps but at the very first step I get the following error:
Error downloading packages:
mysql-community-devel-5.6.36-2.el7.x86_64: [Errno 5] [Errno 2] No such file or directory
mysql-community-libs-5.6.36-2.el7.x86_64: [Errno 5] [Errno 2] No such file or directory
mysql-community-common-5.6.36-2.el7.x86_64: [Errno 5] [Errno 2] No such file or directory
Please tell me why?
ok, let's check possible issues step by step. The problem could be related to connectivity issues, broken packages, a broken rpm repository, or a problem with the mirrors used to download packages. Here are the things to look for:
So first thing we need to check is whether the internet connection is working fine. I'm not convinced this is the real issue, since based your comments it seems you were actually able to other packages, but you never know. Try pinging the DNS server for Google (ping 8.8.8.8) or curling the google website (curl www.google.com). If those things work, move on to the next step, otherwise we need to troubleshoot network service configuration.
If the internet connection is working fine, we need to investigate broken packages:
Run the following commands to clear up your yum cache: sudo yum clean all, sudo yum clean headers, and sudo yum-complete-transaction, then try to install your package again. If still doesn't work, move on to the next step.
Can yum tell us about problem with certain packages? Run package-cleanup --problems. If it shows problems, please update your question with the report. Otherwise move on the the next step.
It's possible that some installation you made in the past made things go wrong. Do yum history and see if you can spot the step where everything went wrong, and use the ID to remove that step by running sudo yum history undo <ID>. Try installing your package now. If that doesn't work, move on to the next step.
Try reinstalling all packages: sudo yum reinstall \*. If that works, try to install your package now, otherwise paste the error in your question.
If all of your packages are fine, we need to investigate issues with rpm.
Try rebuilding your rpm database: sudo rpm --rebuilddb and then try to install again your package.
Please let me know if none of this works, and I'll update the answer.

Error after installing packages with snap

I've used the snap package manager to install packages and I'm always
getting the same error, even with the simple hello world example:
$ sudo snap install hello
$ hello
cannot create user data directory: /home/aaa/snap/hello/20: Bad file descriptor
Running with sudo solves the problem for the hello program, but why do I even need to do sudo?
BTW, for the other packages (Meshlab, CloudCompare) it doesn't work also with sudo and gives different errors. For example:
~$ sudo cloudcompare.ccViewer
mkdir: cannot create directory '/run/user/0': Permission denied
No protocol specified
QXcbConnection: Could not connect to display :0
The snap version and Ubuntu distro are:
$ snap version
snap 2.22.7
snapd 2.22.7
series 16
ubuntu 14.04
kernel 4.4.0-64-generic
Any chance your home directory is an nfs share with no-write-by-root enabled? If so, try logging in as another user that has a local home.
Also, see: https://bugs.launchpad.net/snappy/+bug/1625279

VBoxManage: error: Details: code NS_ERROR_FAILURE (0x80004005) with meanjs and vagrant

I am trying to run mean.js project based on vagrant , but I get the following error with the vagrant up command on ubuntu 14.04 LTS 64 bit.
There was an error while executing `VBoxManage`, a CLI used by Vagrant
for controlling VirtualBox. The command and stderr is shown below.
Command: ["startvm", "d660b7d6-06a3-49bc-8b90-cbad92632c11", "--type", "headless"]
Stderr: VBoxManage: error: The virtual machine 'pets_default_1473142645576_38190' has terminated unexpectedly during startup with exit code 1 (0x1)
VBoxManage: error: Details: code NS_ERROR_FAILURE (0x80004005), component MachineWrap, interface IMachine
I solved the using following steps:
I have completely remove older VirtualBox versions before installing VirtualBox-5.0 !
Uninstall VirtualBox
sudo apt-get purge "^virtualbox-.*"
Update the software repositories
sudo apt-get update
Clean up
sudo apt-get autoremove | sudo apt-get autoclean | sudo apt-get clean
Setup API repository (For Ubuntu 14.04 ("Trusty"))
echo "deb http://download.virtualbox.org/virtualbox/debian trusty contrib" | sudo tee /etc/apt/sources.list.d/oracle-vbox.list
Setup Oracle Key
wget -q https://www.virtualbox.org/download/oracle_vbox_2016.asc -O- | sudo apt-key add -
wget -q https://www.virtualbox.org/download/oracle_vbox.asc -O- | sudo apt-key add -
6.Install Oracle Virtualbox
sudo apt-get update
sudo apt-get install virtualbox-5.1
Start Virtualbox
virtualbox
For more help check to here.
I have reinstalled virtual box and the issue has been solved for me.
On my mac while installing virtual box, It has not allowed me to install. So i went system preference -> security & privacy - > general - 'allow apps download from' -> click on the "allow" button.
I have successfully installed virtual box after the above changes on system preference.
Kitchen converge -> successfully done.
I was using macOS and I had this error after updating VirtualBox. I solved the error by going to:
System Preferences --> Security & Privacy and then clicked on lock to make changes. Then, I clicked on "Allow" as shown in the picture below:
After you make the changes, a restart is requested by the system, after restart the command should work just ok :)
Move to directory:
cd /sbin/
Run script:
sudo ./vboxconfig
Start VM:
VBoxManage startvm "VM name" --type headless
It works:)
Root this problem - system updating. VBox updated partially. This script fix this problem.
For some reason my virtualbox linux host was having an outdated vboxdrv kernel module.
I did the whole remove VirtualBox package, then reinstall, but this old version kernel module remained.
Manually deleted the unwanted module, then freshly reinstalled latest VirtualBox, then usual vboxconfig to rebuild the latest modules, and we're done.
/usr/bin/vboxmanage startvm Win10-Server --type headless now working as expected. :-)
I also faced the same issue, but Santosh Shinde's answer helped me to figure it out.
I, however, want to add to it:
After uninstalling every old/previous version of Virtualbox available on your PC:
sudo apt-get purge "^virtualbox-.*"
And cleaning your system:
sudo apt-get autoremove
Rather than installing Virtualbox from the Apt repository of Ubuntu, simply visit the downloads page of Virtualbox, to download the most current version of Virtualbox.
This is because the Apt repository may not have the latest version of Virtualbox.
I have the same error after install some cripto plugin to Chrome.Then see that Virtual box extension is not working under root and user. In my linux distributive /opt owner was changed to user by cripto plugin installator. Changing /optto root owner has solved the problem.
I just had this happen on a FreeBSD box where vagrant wasn't involved at all.
[root#freebsdserver ~]# vboxmanage startvm yavm
Waiting for VM "yavm" to power on...
VBoxManage: error: The virtual machine 'yavm' has terminated unexpectedly during startup because of signal 6
VBoxManage: error: Details: code NS_ERROR_FAILURE (0x80004005), component MachineWrap, interface IMachine
In this case it's because "freebsdserver" is running headless. The fix was to run:
# vboxmanage startvm yavm --type headless

Docker upgrades failing due to conflicts

I am attempting to upgrade Docker on CentOS 7 from 1.9 to 1.10. I am using the script provided on the Docker website:
https://docs.docker.com/engine/installation/linux/centos/
I am running the script:
curl -fsSL https://get.docker.com/ | sh
Eventually, the script executes the following command:
sudo -E sh -c 'sleep 3; yum -y -q install docker-engine'
This command is failing with the following message:
Error: docker-engine-selinux conflicts with docker-selinux-1.9.1-25.el7.centos.x86_64
Error: docker-engine conflicts with docker-1.9.1-25.el7.centos.x86_64
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest
I have isolated this failure to the yum command, and attempted to run it using the --skip-broken. This doesn't do much, though:
$ sudo yum -y -q --skip-broken install docker-engine
Packages skipped because of dependency problems:
docker-engine-1.10.3-1.el7.centos.x86_64 from docker-main-repo
docker-engine-selinux-1.10.3-1.el7.centos.noarch from docker-main-repo
Trying the rpm command does nothing. Running the referenced rpm command seems to do something, but whatever it does it has no effect on the install. The failure persists.
Internet searches have revealed that others have seen similar problems, but usually their problems come because some dependency, referenced in the failure, was missing. There don't appear to be any missing dependencies on my system.
I even tried removing version 1.9. That does not change anything either.
Following the instructions for a manual install provided on the docker site hasn't changed anything, either.
There is also nothing in the Docker documentation that describes this particular problem.
Has anyone seen this exact problem before? Does anyone know some way to fix it???
Please advise.
From this message:
docker-engine-selinux conflicts with docker-selinux
I suspect you previously had the Red Hat distributed version of Docker installed, which installs docker-selinux. The official Docker packages also install a similar package (docker-engine-selinux) and that conflicts with the package you already have installed.
The best approach would be to uninstall the existing docker version (including the docker-selinux package), and then install docker-engine, following the instructions in the documentation; https://docs.docker.com/engine/installation/linux/centos/

Resources