RPM Installation dependency error - linux

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

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

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/

package python to be installed to custom location

My objective is to build a python rpm that can install to custom location on rhel 6 box.
I have take source from https://dl.iuscommunity.org/pub/ius/stable/Redhat/6/SRPMS/python34u-3.4.3-2.ius.el6.src.rpm
rpmbuild with prefix of /tmp/python/new_install succeeded in packaging.
When I try to install rpm, I am encountering circular dependency.
Install of ABCpython34u-3.4.3-2.ius.el6.x86_64.rpm gives
error: Failed dependencies:
ABCpython34u-libs(x86-64) = 3.4.3-2.ius.el6 is needed by ABCpython34u-3.4.3-2.ius.el6.x86_64
libpython3.4m.so.1.0()(64bit) is needed by ABCpython34u-3.4.3-2.ius.el6.x86_64
Install of ABCpython34u-libs-3.4.3-2.ius.el6.x86_64.rpm gives
error: Failed dependencies:
/tmp/python/new_install/bin/python3.4 is needed by ABCpython34u-libs-3.4.3-2.ius.el6.x86_64
Any guidance is much appreciated.
Update:
/bin/rpm -i --noscripts -v ABCpython34u-libs-3.4.3-2.ius.el6.x86_64.rpm ABCpython34u-3.4.3-2.ius.el6.x86_64.rpm 2>&1
error: Failed dependencies:
libpython3.4m.so.1.0()(64bit) is needed by ABCpython34u-3.4.3-2.ius.el6.x86_64
$ rpm -q --provides -p ABCpython34u-libs-3.4.3-2.ius.el6.x86_64.rpm|grep libpython3.4m.so.1.0
libpython3.4m.so.1.0()(64bit)(ABC)
You just need to install them together:
yum install ./ABCpython34u-3.4.3-2.ius.el6.x86_64.rpm ./ABCpython34u-libs-3.4.3-2.ius.el6.x86_64.rpm
But what you are doing (python in custom location) is very likely wrong. If you want to have recent python on RHEL6 box you very likely want Software Collection:
https://www.softwarecollections.org/en/
https://www.softwarecollections.org/en/scls/rhscl/rh-python34/

Installing RPostgreSQL on Linux

When I try on linux in R
install.packages('RPostgreSQL')
it fails with unspecified errors:
Warning message:
In install.packages("RPostgreSQL") :
installation of package ‘RPostgreSQL’ had non-zero exit status
I tried to solve problem with:
sudo apt-get install postgresql-server-dev-8.4 for postgresql version 8.4.
but it doesn't seems to work.
sudo: apt-get: command not found
I have PostgreSQL 9.1.11 version.
Read the configure log.
You most likely "merely" forgot to read the README and DESCRIPTION and other documentation telling you to do
sudo apt-get install libpq-dev
We develop this on, inter alia, Debian/Ubuntu systems so can be more than sure that it works there.

Resources