Following problem:
After a fresh installation of Blackarch i want to execute
pacman -Syu
but after it downloaded all the packages i get the same error for all packages. For example:
/usr/lib/ruby/gems/2.5.0/gems/colorize-0.8.1/LICENSE exists in both 'ssrf-proxy and 'yawast'
This means that two packages claim ownership of the same file. In reality, they conflict, but the package maintainers haven't noticed and haven't updated MAKEPKG. You'll need to uninstall one of the packages. Use pacman -Qii <package> to inspect each package. If one was explicitly installed, then it's safe to remove with pacman -Rns <package>
Related
There are plenty of perl packages missing in Centos 8 and Rocky Linux. So, I try to get the rpm spec by cpanspec and build rpm by myself. But, it seems like that rpmbuild could not find the rpm I built.
This is the script for me to build rpm.
cd /root/rpmbuild
cpanspec --packer 'Example <example#example.com>' <Perl-Package-Name>
mkdir SOURCES
cp <Perl-Package-Name>.tar.gz SOURCES
rpmbuild -ba perl-<Package-Name>.spec
Let's say we have two package A and B. A is needed by B.
I try to build both of the packages through the script above. I build A first, switch into /root/rpmbuild/RPMS/noarch and install A.rpm. Then, I try to build package B.
I got
error: Failed build dependencies:
perl(A) is needed by perl-<B>
I try to check the existence of package A.
yum list installed | grep A
and
perldoc -l A
Both of the commands show that A exists.
Did I miss something?
update 2022/06/07
I just gave up and commented the BuildRequires: A in B package. This is not a good approach but it works.
If I run the command
dnf groupinstall --downloadonly core
then it will
list all the packages which belongs to the package group core,
resolve their dependencies and
download the rpms locally.
What I want is not to download but only list. Is there any easy way to resolve all dependencies related to all packages pertaining to a particular package group?
I have no idea about the strait way to get the list. But you can download them w/o actually store them in your system:
dnf groupinstall --downloadonly --downloaddir=/dev/null core
This command will list all the packages to be downloaded so grab the output strip unnecessary lines and voila.
If this do not work you can try combination of:
yum deplist <package>
and
yum groupinfo core
You can get the list of packages with groupinfo and loop and get the dependencies via deplist
I'm trying to do yum update on my centos 7 server but i'm getting the following error:
Error: Multilib version problems found. This often means that the root
cause is something else and multilib version checking is just
pointing out that there is a problem. Eg.:
1. You have an upgrade for grub2-tools which is missing some
dependency that another package requires. Yum is trying to
solve this by installing an older version of grub2-tools of the
different architecture. If you exclude the bad architecture
yum will tell you what the root cause is (which package
requires what). You can try redoing the upgrade with
--exclude grub2-tools.otherarch ... this should give you an error
message showing the root cause of the problem.
2. You have multiple architectures of grub2-tools installed, but
yum can only see an upgrade for one of those architectures.
If you don't want/need both architectures anymore then you
can remove the one with the missing update and everything
will work.
3. You have duplicate versions of grub2-tools installed already.
You can use "yum check" to get yum show these errors.
...you can also use --setopt=protected_multilib=false to remove
this checking, however this is almost never the correct thing to
do as something else is very likely to go wrong (often causing
much more problems).
Protected multilib versions: 1:grub2-tools-2.02-0.64.el7.centos.x86_64 != 1:grub2-tools-2.02-0.44.el7.centos.x86_64
Can someone help me solve this?
I encountered the same problem, due to abnormal stop of yum update process.
I solve by removing grub2-tools and then re-install it, skipping the multilib check.
Specifically here's what I did:
[CAUTION! Use at your own risk ]
yum remove grub2-tools
yum install grub2 --setopt=protected_multilib=false
yum clean all
yum update
I manually download a higher version of grub2-tools (the 2.02-0.64) from
https://www.rpmfind.net/linux/rpm2html/search.php?query=grub2-tools&submit=Search+...&system=&arch=
And then I've manually installed it
rpm -ivh grub2-tools-2.02-0.64.el7.centos.x86_64.rpm
The process failed by dependencies, as it needed grub2-common at least same version (2.02-0.64), so I manually download also, and manually install bot
rpm -ivh grub2-common-2.02-0.64.el7.centos.noarch.rpm
rpm -ivh grub2-tools-2.02-0.64.el7.centos.x86_64.rpm
So the problem seems resolved.
Release 1 contains the following packages
Package A-1.0
Package B-1.0
Release 2 contains the following packages
Package A-2.0
Package B-2.0
Package C-2.0
In Release 2, Package B-1.0 was split into two packages - package B-2.0 and package C-2.0.
Now when Release 2 is installed, how do I downgrade to Release 1?
yum downgrade A B tries to install package B-1.0 which has file conflicts with package C-2.0.
yum downgrade A B C does not work because there is no older version for Package C.
Is there a single command through which it erases the new package (package C-2.0) and downgrades packages A and B?
If you upgraded several packages and then you want to downgrade just those two, then it cannot be done. Not using just yum (unless you use --nodeps and temporary break deps). There are high level tools like RH Satellite, which can do that.
If you upgrade just those in separate transaction then you can run:
yum history list
yum history undo <ID>
or
yum history undo last
And it will rollback that transaction. I.e. in your case downgrade those packages.
See man page of yum for details about history command.
It might be too late as you have already released packages A-2.0 and B-2.0, but what you should have done (and can still do if you can delete your A-2.0 and B-2.0 packages):
In spec file of A-2.0 and B-2.0 add: Requires: C
This has multiple advantages you search (and more):
when updating A and/or B; C will be automatically installed.
when uninstalling C A and B will be downgraded.
However:
when downgrading A and B; C will not be uninstalled.
There is an alternative which I use for my projects: I use a meta-package:
meta-package-1.0: Requires A-1.0, B-1.0, Conflicts C
meta-package-2.0: Requires A-2.0, B-2.0, C-2.0
(and I use a branch with an unstable meta-package preparing next release: meta-package: Requires A, B)
You can use yum shell to write multiple operations before executing them all in a single transaction.
In your case, you can use the following:
yum shell
yum downgrade A B
yum remove C
run
you just need to use the repo that was referred while executing the earlier yum command.
yum history undo <yum_history_id> --enablerepo=<yum_repo>
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