Issue with Docker installation on Linux - linux

I am trying to install Docker on RHEL whose version details are shown below
I have downloaded the rpm docker-ce-20.10.2-3.el7.x86_64.rpm from here. And I run the following install command
sudo yum install /home/projuser/usr/share/Docker/docker-ce-20.10.2-3.el7.x86_64.rpm
Error comes up suggesting that docker-ce-rootless-extras is required.
Error: Package: 3:docker-ce-20.10.2-3.el7.x86_64 (/docker-ce-20.10.2-3.el7.x86_64)
Requires: docker-ce-rootless-extras
Here is the full screenshot of error
As per the message I try to install docker-ce-rootless-extras-20.10.2-3.el7.x86_64.rpm that I downloaded from here using command shown below
sudo yum install /home/projuser/usr/share/Docker/docker-ce-rootless-extras-20.10.2-3.el7.x86_64.rpm
I get an error that suggests that docker-ce is required
Error: Package: docker-ce-rootless-extras-20.10.2-3.el7.x86_64 (/docker-ce-rootless-extras-20.10.2-3.el7.x86_64)
Requires: docker-ce
Here is the complete screenshot
So I am not sure how to resolve this dependency as docker-ce and docker-ce-rootless-extras are both not getting installed with dependency on each other. Please let me know if you need any other details.
Please help resolve this

Hope it not too late. You have to install both packages at the same time.
rpm -i docker-ce-XXXXX docker-ce-rootless-extras-XXXXX
This command is working for me.

you need to install the centos package on RHEL. installing the correct package resolved the same issue I was facing. check out this Link

Related

Problem with moby packages when installing docker-ce on CentOS 7

I have a docker image for CentOS 7 which installs docker-ce via the recommended instructions.
i.e.
RUN yum-config-manager \
--add-repo \
https://download.docker.com/linux/centos/docker-ce.repo
RUN yum install -y yum-utils \
device-mapper-persistent-data \
lvm2
RUN yum update -y
RUN yum install -y docker-ce docker-ce-cli containerd.io
Recently this stopped working and now fails as follows:
--> Processing Conflict: moby-containerd-1.3.6+azure-1.x86_64 conflicts containerd
--> Processing Conflict: moby-runc-1.0.0~rc10+azure-2.x86_64 conflicts runc
--> Finished Dependency Resolution
Error: moby-containerd conflicts with containerd.io-1.2.13-3.2.el7.x86_64
Error: moby-runc conflicts with containerd.io-1.2.13-3.2.el7.x86_64
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest
The command '/bin/sh -c yum install -y docker-ce docker-ce-cli containerd.io' returned a non-zero code: 1
If the install command is replaced with:
yum install -y docker
I get a different error to do with an unsigned package:
Package runc is obsoleted by moby-runc, trying to install moby-runc-1.0.0~rc10+azure-2.x86_64 instead
...
Package moby-runc-1.0.0~rc10+azure-2.x86_64.rpm is not signed
I tried forcing use of a few old versions as below to no avail e.g.
RUN yum install -y docker-1.13.1-102.git7f2769b.el7.centos
Why is this happening? How can I fix it? And how can I prevent similar problems in the future?
Update: A critical missing piece of information from this question is the use of Azure. I had the following as aspnetcore is required to publish packages in an Azure devops pipeline:
RUN rpm -Uvh https://packages.microsoft.com/config/centos/7/packages-microsoft-prod.rpm
RUN yum update -y && yum install aspnetcore-runtime-3.1 -y
my repo's needed to be updated --- the following resolved me:
curl https://packages.microsoft.com/config/rhel/7/prod.repo > ./microsoft-prod.repo
sudo cp ./microsoft-prod.repo /etc/yum.repos.d/
yum update -y
https://learn.microsoft.com/en-us/windows-server/administration/linux-package-repository-for-microsoft-software
The Answer from user8475213 worked for me. But I had to run after these commands also:
yum clean metadata
Caveat: Usually disclaimers apply. This is only what I think, I may be mistaken. Please comment / suggest edits if so.
How can I fix it?
This was actually a problem with the baseurl of a repo not the docker-ce repo (though I did originally file a bug report there (see issue #11198).
The moby packages come from "packages-microsoft-com-prod".
It seems the baseurl has changed.
The correct one is now:
baseurl=https://packages.microsoft.com/rhel/7/prod/
installed via:
RUN curl https://packages.microsoft.com/config/rhel/7/prod.repo >/etc/yum.repos.d/microsoft-prod.repo
The one with the dodgy packages is:
baseurl=https://packages.microsoft.com/centos/7/prod/
Installed via:
RUN rpm -Uvh https://packages.microsoft.com/config/centos/7/packages-microsoft-prod.rpm
The moby packages exist only in the CentOS repo which is possibly defunct, as Microsoft themselves have changed installation documentation in various places.
There was also a workaround. You can exclude the 'moby' packages until they are really ready as in:
RUN yum install -y docker --exclude=moby-\*
Why is this happening?
I think this is caused by overly aggressive promotion of moby replacements for docker-ce functionality.
It is hopefully a transient state while they are working things out.
That the package moby-runc-1.0.0~rc10+azure-2.x86_64.rpm is not signed suggests a problem with the build process used. This package ought only to be available to beta testers. Certainly not in a repository marked "stable".
How can I prevent similar problems in the future?
Contrary to popular myths, using docker does not completely isolate you from changes in the environment. The repositories used by your docker files are themselves part of the environment. If that environment changes, as in this case, then your reproducible build may cease to be reproducible. The only real way to avoid that is to host your own repositories which comes at a high price. Usually external repositories are stable enough that this is not an issue.
You should consider specifying specific versions of packages to install in your dockerfile to avoid getting unexpected upgrades. However, that will not help you in cases like this where a package is obsoleted and replaced.
Related problem in RHEL 8
Seems that azure depends on packages from the container-tools module, and Docker conflicts with these packages.
# dnf remove #container-tools

Can't install condor on CentOS

I have been trying to install condor on my centos virtual machine but keep getting the following errors:
--> Finished Dependency Resolution
Error: Package: condor-classads-8.5.5-1.el6.x86_64 (htcondor-development)
Requires: libpcre.so.0()(64bit)
Error: Package: condor-8.5.5-1.el6.x86_64 (htcondor-development)
Requires: ecryptfs-utils
Error: Package: condor-8.5.5-1.el6.x86_64 (htcondor-development)
Requires: libpcre.so.0()(64bit)
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest
I looked around online and tried all the suggestions but nothing's worked. I did the next logical thing and tried to install those packages but doing yum install ecryptfs-utils gave me "Nothing to do," message. Same with libpcre.so.0() I'm a beginner with Linux so I don't know what I'm doing wrong here. Help appreciated.
I had the same issue, and this was happening because yum was trying to install different version of condor. I was running centos 6.6, but yum was trying to install centos 7 (rhel 7) version. The reason for this was, by mistake, I initially downloaded and setup the rhel7 repo details of condor, and results got cached.
The solution is to clear yum cache (yum clean all), download the correct condor repo for your CentOS version/arch (use rpm -q centos-release to find this out), and then install (yum install condor-all).
Get condor from the official location. It has all the binaries it needs.

PhpStorm Installation issue on Ubuntu 14.04

I am back here again with one more issue that I am having installing PhpStorm on my Ubuntu 14.04. To do so I followed the following steps:
Step 1. sudo apt-get purge openjdk* which gave me a long list mostly saying Package is not installed, so not removed. A few examples:
Package 'openjdk-7-dbg' is not installed, so not removed
Package 'openjdk-7-doc' is not installed, so not removed
...
0 upgraded, 0 newly installed, 0 to remove and 4 not upgraded.
Step 2: sudo add-apt-repository ppa:webupd8team/java which ended up saying this:
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
oracle-java7-set-default : Depends: oracle-java7-installer but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
Step 3: Despite those error messages popped up I went ahead and ran sudo apt-get update which executed OK.
Step 4: Tried to run sudo apt-get install oracle-java7-installer which again popped up a lot of negative remarks!
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
oracle-java7-installer : Depends: java-common (>= 0.24) but it is not installable
Recommends: gsfonts-x11 but it is not installable
E: Unable to correct problems, you have held broken packages.
So I did not go further with rest of the following commands:
sudo apt-get install oracle-java7-set-default
wget http://download-cf.jetbrains.com/webide/PhpStorm-7.1.3.tar.gz
tar -xvf PhpStorm-7.1.3.tar.gz
cd PhpStorm-133.982/bin
./phpstorm.sh
I have no idea what is going wrong! Somebody please help this absolute newbie to install it.
On another note, if PhpStorm fails to install somehow on my PC, please suggest me a good software which runs on Ubuntu with an inbuilt SASS compiler so that I do not have to run a command every time from terminal? And it would be even better if that software I can get for free! PhpStorm is only a 30-day trial.
EDIT
Strange, I'm using PhpStarm on Ubuntu 14.04 and ant works fine. IntelliJ IDEs are really great.
I have these Java from the same repo you are using.
java-common-0.51
java-wrappers-0.1.27
oracle-java7-installer-7u80+7u60arm-0~webupd8~1
Let's try to purge all the Java packages from you system and then install the Oracle Java again.
Use dpkg -l | grep java to discover all the installed java-related packages.
Then, use apt-get purge on all of them.
Skip the javascipt packages of course.
Then, try to install oracle-java7-installer again. I hope it will be installed correctly.
To install Phpstorm in Ubuntu just follow these steps
1.Run sudo apt install snapd
2.Then sudo snap install phpstorm --classic
3.Then type phpstorm in shell and press enter to launch Phpstorm
Read more about these here

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/

RPM Installation dependency error

I am attempting to install StackStorm on a RHEL6 environment since I was encountering issues with their deployment script. I believe I got all the required software installed but have been encountering issues trying to install the actual StackStorm packages. All my commands are run with the sudo prefix as the root user.
Ex command:
sudo rpm -i st2common-0.11.0-6.noarch.rpm
Output:
error: Failed dependencies:
python(abi) = 2.7 is needed by st2common-0.11.0-6.noarch
Here is the resource I am using:
http://docs.stackstorm.com/install/rpm.html
How can I resolve this dependency error and update python?
Thanks!
You can do it using yum.
yum localinstall st2common-0.11.0-6.noarch.rpm

Resources