I am trying to find the missing dependencies of an uninstalled rpm of an iso. I am unable to find any command that listing me missing dependencies of an uninstalled rpm. Any help from your side would be great.Thanks in advance
Use rpm -Vp --nofiledigest foo*.rpm to check dependencies against the system /var/lib/rpm database.
Create an alternative "everything" rpmdb that contains all possible package headers and use --dbpath /some/other/rpmdb more generally.
The "everything" rpm db can be created with rpm -Uvh --dbpath /some/other/rpmdb --justdb --noscripts --notriggers *.rpm (assuming all *.rpm packages of interest are in the current directory). You can also create a manifest: a file of paths to all *.rpm packages.
Related
I know that I can retrieve all dependencies recursively using yumdownloader --downloadonly. But is there a way that I can do it by passing the an rpm file instead of the package name? like yum install ./google-chrome-stable_current_x86_64.rpm --downloadonly --downloaddir=xx with some option to download dependencies of chrome's dependencies.
Why dont you pull the NEVRA from the RPM file and pass it to yumdownloader
yumdownloader --resolve $(rpm -qp ./<RPMPACKAGE>.rpm --queryformat="%{nevra}")
I'm trying to write a spec RPM file to build an RPM package.
Here is in essence my spec file:
[...]
Requires: nodejs java-1.8.0-openjdk java-1.8.0-openjdk-devel log4j
%define _rpmdir ../
%define _rpmfilename %%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}.rpm
%define _unpackaged_files_terminate_build 0
%pre
[Some script]
%post
[Some script]
%preun
[Some script]
%postun
[Some script]
%install
[...]
%files
[...]
I've managed to install the package dependencies with the preamble Requires expect one that doesn't exist as a yum package (tomcat8). I found on the internet that the way to install it on centOS is:
wget https://harbottle.gitlab.io/harbottle-main/7/x86_64/00853071-tomcat8/tomcat8-8.5.37-2.el7.harbottle.x86_64.rpm
rpm -ivh tomcat8-8.5.37-2.el7.harbottle.x86_64.rpm
But where should I put it in the spec file? I tried to put it in the %pre script, but there is a lock on rpm that prevent its use. I tried to put it in the %install part, but it didn't seem right. Can you please help me to fix this problem? Is there a way to still put it in the Requires preamble?
Thanks!
this is not the way you should manage those dependencies. You should search for a way to make this rpm available in you repositories. I see multiple options:
add the harbottle repository:yum-config-manager --add-repo https://harbottle.gitlab.io/harbottle-main/7/x86_64/. Now your yum will be able to find the tomcat8 rpm by itself
If you want to make sure the package remains available; better copy the tomcat8.rpm inside your own repository besides your other rpms.
I have converted Debian package installation to CentOS RPM using alian. I'm getting below error when I try to install it.
Error:
file /etc/init.d from install of <package> conflicts with file from package chkconfig
I can install it by rpm -Uvh --force but I'm getting Not starting : <package> disabled. when I try to start it using init.d.
I'm not sure how to what is the correct path to track the issue. I appreciate some help.
To prevent the conflict you should exclude /etc/init.d from the .spec file. e.g.
%files
/etc
%exclude %dir /etc/init.d
This will only exclude the /etc/init.d directory. Any files under /etc/init.d/* will still be included.
I have downloaded a package with it's dependency and want to install a package with dependency. Even though i have download in local folder it's checking for online.
sudo yum -y --disablerepo=* localinstall autoconf-2.69-11.el7.noarch.rpm
I am trying above command but failed to load it's dependency that is there in same folder.
Thanks,
Hare
Inside the local directory where you have all the downloaded RPMs, do this:
sudo yum --disablerepo=* localinstall *.rpm
OR
sudo yum --disablerepo=* localinstall foo.rpm bar.rpm baz.rpm
Since you have downloaded all the dependencies to a single directory, you can also use rpm to install those:
sudo rpm -Uvvh *.rpm --test
--test does a dry-run. Remove it to install on disk.
Even if the solution provide by iamauser is very great (and I am using it all the time), I wish to give you an other way to do it.
It exists yum-downloader command which doing basically the same thing for you.
# yumdownloader <package> --resolve
You just have to download it first :
# yum install yum-utils
Overall, I suggest you to read this article from Red Hat company site's which details everything about those two methods :
https://access.redhat.com/solutions/10154
I install my new rpm package using yum install (my package name) command; yum command installs main rpm package along with dependencies; there is no issue.
If my main package is updated to new and higher version then yum update (my package name) work fine, without any issues.
Please note, I execute createrepo command whenever new rpm is copied into rpm collection folder.
Problem is: If only adependent rpm is upgraded i.e. to new version in rpm collection folder at repo server, How to update only dependent rpms on client machine (RH machine)?
What I tried:
1. sudo yum update (my package name) command always returns (my package name) is already updated but It did not even check dependencies for a new version
I added one more dependent pkg (deppkg) section in repo file like below:
[mainpkg]
name=simplest
baseurl="file:///home/anand/testcode/rpmtest/"
gpgcheck=0
[deppkg]
name=simplest
baseurl="file:///home/anand/testcode/rpmtest/"
gpgcheck=0
Having added one deppkg section, yum update deppkg started working which is obvious. Still, yum update mainpkg command still does not find new dependencies.
I do not want to go by 2nd option as there can be many pkgs and will have to add or delete time to time so it will be difficult in the long run.
Could you please let me know if there are any alternative ways which would be useful to update only dependencies from a remote machine?
Regards,
Anand Choubey
Just "sudo yum upgrade" should pull in the updates. Don't give it any package names.
Edit: If you only want the ones from your repo, you can do "sudo yum upgrade --disablerepo=* --enablerepo=yourreponame"
you can run sudo yum makecache to update repos
and sudo yum update --downloadonly to pull rpm's without installing it