centos 7.3 docker-engine conflicts with docker-common-2 - docker

After following the official installation document below
https://docs.docker.com/engine/installation/linux/centos/
I still end up with failure with docker-common-2 transaction conflict
Transaction check error:
file /usr/bin/docker from install of docker-engine-1.13.0-1.el7.centos.x86_64 conflicts with file from package docker-common-2:1.10.3-59.el7.centos.x86_64
I tried yum remove docker-common-2 immediately but apparently there is no such package found so I yum clean all but the failure is still there.
I had encountered that selinux conflict before and I did remove conflict the package docker-selinux if it is the case.
How can I solve this?

OK I managed to solve it by myself.
I searched for docker-common instead of docker-common-2 and I found that conflict package. It should be installed from centos yum repos so just yum remove -y docker-common to remove it before you install docker-engine

Try the following:
step 1: sudo yum erase docker
step 2: sudo yum clean all
and then, Install the required packages,
step 3: sudo yum install docker-common-2

After remove docker its good to run following
sudo yum autoremove
Remove packages that has not dependencies and can be removed from machine.
"yum autoremove" tries to remove any packages that waren’t installed explicitly by the user and which aren’t required.

Using the flowing command solve the problem, actually it is easier.
curl -fsSL https://get.docker.com/ | sh

Related

Package 'cgroupfs-mount' has no installation candidate

I'm trying to install docker ce on wsl on windows home version 17134.765 (18.3). I'm following the directions in the screenshot after installing wsl with ubuntu 18.04 from https://github.com/Microsoft/WSL/issues/2291#issuecomment-477632663. It seems to be working until the line:
~$ sudo apt -y install cgroupfs-mount
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package cgroupfs-mount is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package 'cgroupfs-mount' has no installation candidate
How can I get this working?
The same issue. But I found cgroupfs-mount is not necessary. I run the follow command, then start docker successfully!
sudo chmod -R 777 /var/run/docker.sock

Unmet dependencies when installing libboost-all-dev on i386/debian Docker image

I want to dockerize a build environment for Linux i386 targets. I need to install library dependencies such as boost. But I came across this error:
Dockerfile
FROM i386/debian:sid
RUN apt-get update
RUN apt-get -y install libboost1.67-all-dev
But even this simple script failed:
The following packages have unmet dependencies:
libboost1.67-all-dev : Depends: libboost-mpi1.67-dev but it is not going to be installed
Depends: libboost-mpi-python1.67-dev but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
I changed to libboost1.67-dev and it worked. I'm not sure what's the difference. If someone knows please explain that to me.
In a similar situation, I found two solutions:
opt.1) sudo apt install <unmet dependencies and sub-dependencies>
this is not straightforward but it should work
opt.2) give up all-dev and install only required packages which may be like
sudo apt install build-essential:i386 libboost-system-dev:i386 libboost-thread-dev:i386 libboost-program-options-dev:i386 libboost-test-dev:i386

Docker on Debian Stretch gnutls_handshake() failed

I'm trying to install docker on my Stretch Debian.
I Followed the guide but when I use "sudo apt-get update" I get :
https://download.docker.com/linux/debian stretch/stable amd64 Packages
gnutls_handshake() failed: Public key signature verification has
failed.
"curl -fsSL https://download.docker.com/linux/debian/gpg | sudo apt-key add -"
returned OK
This is a known issue on Debian Stretch installations that have been upgraded from Debian Jessie. The issue is described here: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=834724. As described in the Debian bug report, you can fix this by removing the now obsolete library libgnutls-deb0-28.
If you have been a user of deb-multimedia like I have, removing this particular version of libgnutls is not entirely straight-forward because you probably have a version of librtmp1 from deb-multimedia installed that is newer than what is provided by Debian Stretch and that depends on libgnutls-deb0-28. The solution is to first downgrade librtmp1 to the version provided by Stretch and then remove libgnutls:
sudo apt install librtmp1=2.4+20151223.gitfa8646d.1-1
sudo apt remove libgnutls-deb0-28
If you are using aptitude instead of apt then aptitude will automatically suggest to downgrade librtmp1.

erlang is no longer supported by Red Hat Enterprise Linux?

I'm trying installing Erlang on my REHL7.2, but unfortunately I failed. I tried two approaches
First I tried downloading a RPM package from official site of erlang (in fact the rpm package is for CentOS, but there's no RPM package for RHEL anyway), but
error: Failed dependencies:
libwx_baseu-2.8.so.0()(64bit) is needed by esl-erlang-19.0-1.x86_64
libwx_baseu-2.8.so.0(WXU_2.8)(64bit) is needed by esl-erlang-19.0-1.x86_64
Then I tried
$ wget http://packages.erlang-solutions.com/erlang-solutions-1.0-1.noarch.rpm
$ rpm -Uvh erlang-solutions-1.0-1.noarch.rpm
But it failed too because
No package erlang available.
Error: Nothing to do
I wonder whether Erlang is no longer supported by RHEL? Otherwise how can I install Erlang on my RHEL7.2?
One simple solution to install the Erlang Solutions package is install the epel repository:
yum install epel-release
Then
wget https://packages.erlang-solutions.com/erlang-solutions-1.0-1.noarch.rpm
rpm -Uvh erlang-solutions-1.0-1.noarch.rpm
sudo yum install erlang
The epel repo contains the libwx_* libraries required.
As instructed here:
enter link description here
Run the following commands (note: the commands on the above link use R15B01, but in the following commands, I changed it to the last release of Erlang (R15B03) It will take a while to finish with the installation. Run commands line by line
sudo yum install gcc glibc-devel make ncurses-devel openssl-devel autoconf
wget http://erlang.org/download/otp_src_R15B03.tar.gz
tar zxvf otp_src_R15B03.tar.gz
cd otp_src_R15B03
./configure && make && sudo make install
After everything is done, you will be still at otp_src_R15B03 where Erlang is installed. Type erl and Enter, then, it should run and open Erlang prompt. I tried running Erlang from my home directory and from the root by just typing erl and it worked too. This way, Erlang is working good for me. To quit Erlang press CTRL + g then q and Enter
There is another way to install and useful info on this link:
enter link description here
I have figured it out! I found two solutions.
The first solution which is also the easiest way is to install a zero dependency version of erlang, please refer to my another Question. But I only tried this way after installing erlang from source, so if you failed this way, just try the following soltuion.
The other one is to build erlang from source (or by kerl which is essentially the same thing).
Install necessary dependencies:$sudo yum install ncurses-devel openssl-devel *openjdk-devel unixODBC unixODBC-devel
Download source code of erlang, unzip it and cd into the direcotry
sudo ./configure sudo make sudo make install
Please refer to this article.
Thank you everyone!
Try this, worked for me.
wget http://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
rpm -ivh epel-release-latest-7.noarch.rpm
sudo yum install erlang erlang-nox

Xvfb not found on your system

I try to use Xvfb to make the headless code run. However, I encountered the problem that "Xvfb not found on your system" when I tried to run my ruby code. Then I tried to install Xvfb using
sudo apt-get install xvfb
However, "apt-get: command not found" is showed. Thus, I have not idea what should be installed to avoid the original Xvfb error. Any helps? Thank you.
Old question, but found it will trying to find the apt-get commands. The command not found is likely because you are not on a debian system. So you should probably be using yum.
Some potentially useful links:
https://serverfault.com/questions/344793/install-xvfb-via-yum-yum-repository-for-xvfb
How to install Xvfb (X virtual framebuffer) on Redhat 6.5?
In CentOS 7, the following command will install it:
$ sudo yum install xorg-x11-server-Xvfb

Resources