Wind River Linux, Failed Dependency Error - linux

I am working on Wind River Linux. Failed Dependency Error. Can anyone please tell me what I have to do ? I have been trying from past one day
root#AC-04:/home/mysql# rpm -ivh MySQL-server-5.6.33-1.linux_glibc2.5.x86_64.rpm
warning: MySQL-server-5.6.33-1.linux_glibc2.5.x86_64.rpm: Header V3 DSA signature: NOKEY, key ID 5072e1f5
error: Failed dependencies:
/sbin/chkconfig is needed by MySQL-server-5.6.33-1.linux_glibc2.5.x86_64
/usr/lib64/mysql/plugin is needed by MySQL-server-5.6.33-1.linux_glibc2.5.x86_64
/usr/lib64/mysql/plugin/debug is needed by MySQL-server-5.6.33-1.linux_glibc2.5.x86_64

First of all, use -Uvh instead of -ivh when installing: -Uvh is almost (kernel is the one exception) the right way to install/upgrade rpm packages.
The final solution will be to find the packages that provide those dependencies using (if all else fails)
rpm -qP /sbin/chkconfig *.rpm
on the WRL packages, and make sure those packages are installed.
Those are all file/directpory dependencies. Try (e.g.)
rpm -qf --whatprovides /sbin/chkconfig
to see if there is a package that provides the file.
(Note: what follows "works" for RPM5 on WRL, not RPM on Fedora/RHEL)
You can stub out dependencies by doing (e.g.)
mkdir -p /etc/rpm/sysinfo
echo "/sbin/chkconfig" >> /etc/rpm/sysinfo/Requirename
Masking the dependencies will permit installation (so will --nodeps) and might help get you further along in debugging your packaging.

Related

Building apr-utils from Source on CentOS 7 -- dependancy issue

Im attempting to build apr-utils-1.6.1 from source on CentOS 7 (with the goal to get httpd-2.4.29) but I'm stuck with a dependancy issue:
# rpmbuild -tb apr-util-1.6.1.tar.bz2
error: Failed build dependencies:
db4-devel is needed by apr-util-1.6.1-1.x86_64
db4-devel isn't available in yum and libdb-devel provides version 5, which doesn't meet the dependency requirement.
I've tried downloading and installing db4-devel, but that has it's own dependencies that I can't meet:
# rpm -iv db4-devel-4.7.25-22.el6.x86_64.rpm
warning: db4-devel-4.7.25-22.el6.x86_64.rpm: Header V3 RSA/SHA1 Signature, key ID c105b9de: NOKEY
error: Failed dependencies:
db4 = 4.7.25-22.el6 is needed by db4-devel-4.7.25-22.el6.x86_64
db4-cxx = 4.7.25-22.el6 is needed by db4-devel-4.7.25-22.el6.x86_64
libdb-4.7.so()(64bit) is needed by db4-devel-4.7.25-22.el6.x86_64
libdb_cxx-4.7.so()(64bit) is needed by db4-devel-4.7.25-22.el6.x86_64
Trying to install db4 fails too because the the Berkely DB version 5 is already installed and in use on CentOS 7:
# rpm -iv db4-4.7.25-22.el6.x86_64.rpm
warning: db4-4.7.25-22.el6.x86_64.rpm: Header V3 RSA/SHA1 Signature, key ID c105b9de: NOKEY
error: Failed dependencies:
db4 < 5 is obsoleted by (installed) libdb-5.3.21-20.el7.x86_64
I'm not really sure how to proceed at this point. Do I just have to cut my losses and deploy a CentOS 6 box? It seems that CentOS 6 still has db4. I was thinking of modifying the spec file to remove the db4 requirement, but I'm not sure of the implications of that, or how to even do that properly.
Thanks.
rpmbuild -tb apr-util-1.6.1.tar.bz2
No spec file, but apr-util-1.6.1/build/rpm/apr-util.spec.in
Better use a source with a regular apr-util.spec file : apr-util-1.6.1-1.fc27.src.rpm http://dl.fedoraproject.org/pub/fedora/linux/updates/27/SRPMS/Packages/a/apr-util-1.6.1-1.fc27.src.rpm
Please do not build rpm packages as root, setup an unprivileged rpmbuild environment in /home/name/ : https://www.linuxquestions.org/questions/linux-software-2/need-rpm-package-for-php-version-5-2-7-and-up-on-redhat-5-1-a-766486/#13
Unpack the source with $ rpm -Uvh apr-util-1.6.1-1.fc27.src.rpm ... and $ cd rpms/SPECS/ ... edit 'apr-util.spec' to the new dependencies, and give it a try : $ rpmbuild -bb apr-util.spec
In Redhat release 7.5 is required to install the db4-devel package but it was replaced with libdb-devel. The below steps are necessary to create the packages for apr-util from the tar-ball file
yum install libdb-devel
rpmbuild -tb apr-util-1.6.1.tar.bz2
cd ~/rpmbuild
rm -rf BUILD BUILDROOT RPMS SRPMS
cp ../ apr-util-1.6.1.tar.bz2 SOURCES/
cd SPECS
vim apr-util.spec and replace db4-devel by libdb-devel
rpmbuild -bb apr-util.spec
cd ../RPMS/x86_64
All the packages for apr-util will be there.

Rpm Installation Error, libstdc++-4.4.4-13.el6

Im trying to install this rpm "libstdc++-4.4.4-13.el6.x86_64"
But Im having this error:-
# rpm -ivh libstdc++-4.4.4-13.el6.x86_64.rpm
warning: libstdc++-4.4.4-13.el6.x86_64.rpm: Header V3 DSA/SHA1 Signature, key ID 1d1e034b: NOKEY
Preparing... ########################################### [100%]
package libstdc++-4.4.7-4.el6.x86_64 (which is newer than libstdc++-4.4.4-13.el6.x86_64) is already installed
file /usr/lib64/libstdc++.so.6.0.13 from install of libstdc++-4.4.4-13.el6.x86_64 conflicts with file from package libstdc++-4.4.7-4.el6.x86_64
Im also trying to install this rpm "libstdc++-4.4.7-4.el6.x86_64" as my previous attempt to install "libstdc++-4.4.4-13.el6.x86_64", but the method does not working.
I did try replace "rpm -ivh --replacefiles" command., in order to replace libstdc++-4.4.7-4.el6.x86_64 with libstdc++-4.4.7-4.el6.x86_64, as well with libstdc++-4.4.4-13.el6.x86_64 but the method is also does not working.
I also did try the sudo command, but still getting the similar situation. Any suggestions would be nice
Its alrite, I have got it figure out..
Just force installation the rpm using this command
rpm -ivh --old-package
rpm -ivh --force
Either should do.

Check RPM dependencies

When you are installing a program using .deb packages on Ubuntu, you can check dependencies of package using Ubuntu Packages Search. For example I can see dependencies of Wireshark from here. As you can see, dependencies marked by red bullet. If you know all packages your program depends them, you can download and install them using dpkg.
Is there any alternative website for RPM packages? Specially for RHEL?
I know that I can get these packages' names by other methods such as when installing RPM package using rpm -i, but it is not user friendly and needs access to running Linux.
In fact that's not a one but four different questions :).
*) First you can quickly list a downloaded package's dependencies/requirements by using the following commands:
$ rpm -qp mypackage.rpm --provides
$ rpm -qp mypackage.rpm --requires
*) Second, you can use yum utility in order to satisfy these (somewhat cryptic) dependencies automatically (assuming that all your repositories are set up correctly, and all the dependencies are available):
$ sudo yum install mypackage.rpm
*) Third, there are several RPM search resources, some of them already suggested above. I'd like to list another one, just for the reference - pkgs.org.
*) Fourth, there is an additional popular repository for RHEL5 and RHEL6 distros - EPEL. Note that it's not supported by Red Hat.
Hope my answer(s) will help.
To merely list all dependencies of a package on the command-line, here is an example which builds upon the answer by Peter:
$ PKG="http://yum.postgresql.org/9.3/redhat/rhel-6.2-x86_64/pgdg-sl93-9.3-1.noarch.rpm"
Using yum (recommended):
$ yum -q deplist $PKG
package: pgdg-sl93.noarch 9.3-1
dependency: sl-release
Unsatisfied dependency
dependency: /bin/sh
provider: bash.x86_64 4.1.2-8.el6
dependency: config(pgdg-sl93) = 9.3-1
provider: pgdg-sl93.noarch 9.3-1
-q above is of course optional and is equivalent to --quiet.
Using rpm:
$ rpm -qpR $PKG
/bin/sh
config(pgdg-sl93) = 9.3-1
rpmlib(CompressedFileNames) <= 3.0.4-1
rpmlib(FileDigests) <= 4.6.0-1
rpmlib(PayloadFilesHavePrefix) <= 4.0-1
sl-release
-qpR above is equivalent to --query --package --requires.
This site http://www.rpmfind.net/linux/RPM/ provides a search engine for rpm files. You can see dependencies and description. It also classifies them per distro.

SPEC file builds two RPMs, but dependency makes -Uvh upgrade impossible

I'm working on a spec file (foo.spec) that, when built, results in two RPMs: foo-1-1.i386.rpm (the main program) and libfoo-1-1.i386.rpm (the required library files). The foo.spec file states that foo requires libfoo at the same version and release level:
Requires: libfoo = %{version}-%{release}
foo-1-1 installs just fine with:
rpm -ivh libfoo-1-1.i386.rpm
which installs the dependent library, and then:
rpm -ivh foo-1-1.i386.rpm
But upgrading to a newer version (foo-2-1) doesn't work because of the dependency on the libraries:
$ rpm -Uvh libfoo-2-1.i386.rpm
error: Failed dependencies:
libfoo = 1-1 is needed by (installed) foo-1-1.i386
$ rpm -Uvh foo-2-1.i386.rpm
error: Failed dependencies:
libfoo = 2-1 is needed by foo-2-1.i386
So I'm stuck. I want users to be able to do rpm -Uvh to upgrade the foo package (requiring them to ignore dependencies, etc. is asking too much of novice users).
Any ideas of how I can work around this so that rpm -Uvh can be used to upgrade all parts of the package when a new release is available?
Thanks in advance.
rpm shouldn't and doesn't allow you to update these RPMs individually as the the state between installing the first RPM and the second is not valid.
You can, as Hasturkun points out, install both of them in the same command:
rpm -Uvh libfoo-2-1.i386.rpm foo-1-1.i386.rpm
FWIW, if you creaate a yum repo and used that to update you would find that updating one RPM would automatically drag in the other.

Installing RPM Dependencies

I am trying to install dbus-1.1.2-12.el5.i386 but I get the error
" dbus-libs = 1.1.2-12.el5 is needed by dbus-1.1.2-12.el5.i386" :-(
So I downloaded "dbus-libs-1.1.2-12.el5.i386.rpm" in the same directory and ran the
command rpm -ivh dbus-1.1.2-12.el5.i386 again, but I still got the same error. On searching on Forums I found that RPM takes care of dependecies if they are present in the same Directory. but it does not work with -ivh option ??
Steve B is correct:
yum install dbus-libs
yum install dbus
yum will also allow you to do "whatprovides" for a package:
yum whatprovides dbus-libs
This will show you if you have another version of dbus-libs "installed" on your system, it spools out what repos provide the package and is any are provided (installed) locally.
Also helpful is:
rpm -q dbus
which will show any packages that are locally install as will:
rpm -q dbus-libs
or
rpm -qa | grep 'dbus'
You may find that you already have an eariler version of dbus installed, which case:
yum -y update dbus
Hope this helps.
http://www.of-networks.co.uk
You need to install the dependant RPMs before installing dbus. You should also know that this is the hard way, these days RPM-based distributions usually have a dependancy managment system so that you don't need to do this by hand. e.g. on Redhat/Fedora/Centos you can just type "yum install mypackagename".

Resources