Docker upgrades failing due to conflicts - linux

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/

Related

Issue with Docker installation on 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

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

Install gitlab-ce on ubuntu server 17.04

I'm trying to install the gitlab-ce package on a system running Ubuntu server 17.04. I followed the official installation instructions here.
First I ran:
sudo apt-get install curl openssh-server ca-certificates postfix
I already had all of those installed. Then I ran:
curl -sS https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.deb.sh | sudo bash
Which also worked fine. But when I try to run
sudo apt-get install gitlab-ce
I get the following error message:
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package gitlab-ce
I know it's possible to install gitlab on Ubuntu server 17.04, since I had already done It on a previous installation. Unfortunately I installed the OS again from scratch and I can't remember how I had installed gitlab.
Thanks for any help in advance!
I gave up with the "full" automated script, as it doesn't appear to be working with 17.04... Anyway. I grabbed the latest package from https://packages.gitlab.com/gitlab/gitlab-ce/packages/ubuntu/xenial/gitlab-ce_9.3.0-ce.0_amd64.deb
curl -LJO https://packages.gitlab.com/gitlab/gitlab-ce/packages/ubuntu/xenial/gitlab-ce_9.3.0-ce.0_amd64.deb/download
Installed it with the package manager
sudo dpkg -i gitlab-ce_9.3.0-ce.0_amd64.deb
Then configured it with
sudo gitlab-ctl reconfigure
Then, point your web browser at your new gitlab install and you should be good to go...
Ubuntu 20.04.1
Incase anyone bumps back into this, while trying to gitlab on version 20.0.4 of ubuntu, life is much easier... and the instructions and automated script actually work. GitLab-CE installation instructions
on a fresh install of ubuntu: -
sudo apt install curl
curl -s https://packages.gitlab.com/install/repositories/gitlab/gitlab- ce/script.deb.sh | sudo bash
sudo apt install gitlab-ce
done!
I was facing the same problem (Lubuntu 17.10), after searching the gitlab forums for 2 Hours, I found this thread.
So from what I have read: Gitlab-ce is not supported for zesty yet. Also the simple
sudo apt-get install gitlab
is a wrong prompt cause it installs a Ubuntu package created by a user named as "praveen" and It is not officially supported by Gitlab.
here is what I did To solve my problem:
sudo nano /etc/apt/sources.list.d/gitlab_gitlab-ce.list.save
sudo nano /etc/apt/sources.list.d/gitlab_gitlab-ce.list
replace "zesty" with "xenial" (These files are root access only)
sudo apt update
sudo apt-get install gitlab-ce
This worked for me.
I have spent my whole afternoon for solving this problem, I hope this solution works for you too.
Prost !
EDIT: corrected spelling
I had the same problem getting the install to run on 17.10. According to an issue on their site ( https://gitlab.com/gitlab-org/gitlab-runner/issues/2851 ), the artful packages are not being built.
I did the same this as #DevX, but just changed the parameters on their setup script.
Howler#GitLab:/tmp$ curl -LO https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.deb.sh
Howler#GitLab:/tmp$ sudo os=ubuntu dist=xenial bash ./script.deb.sh
Howler#GitLab:/tmp$ sudo apt-get install gitlab-ce

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.

Error installing nodejs in arch linux

Okay so i just made a fresh install of nodejs package on archlinux using pacman. Command for the same was
sudo pacman -S nodejs npm . Now when i tried to run the same i am getting error as
node: error while loading shared libraries: libicui18n.so.57: Which pretty much means that libicu is either not there or not the correct version. The problem that i am facing is that it is not there in pacman. I tried
sudo pacman -S libicu, which returned not able to find the package. What is the right way to resolve this issue. FYI : just a note, i would prefer not to install from source and prefer using pacman for the same. If there is any other output that you need to know please comment below and will let you know about the same.
I am currently on manjaro i3 fresh install.
Just found out, The name for package in arch linux is icu and not libicu. Once that is installed node will start working fine.
Update
After using node for quite sometime i realised that a better way to install node is using NVM. It would install both node and npm locally and you get the option to manage multiple version.Installation is as simple as
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.32.1/install.sh | bash
This error is caused by installing node js and npm package modules with missing packages that are unsupported by your system how about you try this:
$ sudo pacman -Rsc -n nodejs
$ sudo pacman -Sy nodejs
$ sudo pacman -Sy npm
did you use testing repo?
If you enabled testing repositories, but later on decided to disable them, you should:
Remove/Comment them from /etc/pacman.conf
pacman -Syuu to "rollback" your updates from these repositories.
The second item is optional, but keep it in mind if you notice any problems.
Also you can install stable ver : pacman -S core/icu
You just need to update arch
sudo pacman -Syu

Resources