[SOLVED] Resolving dependency errors in RHEL yum with python* packages
Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Resolving dependency errors in RHEL yum with python* packages
Hello,
I've got a RHEL 7.5 system that is having trouble with "sudo yum update". When I run that command, it says:
Code:
Resolving Dependencies
--> Running transaction check
---> Package python.x86_64 0:2.7.5-68.el7 will be updated
--> Processing Dependency: python = 2.7.5-68.el7 for package: tkinter-2.7.5-68.el7.x86_64
---> Package python.x86_64 0:2.7.5-69.el7_5 will be an update
---> Package python-libs.x86_64 0:2.7.5-68.el7 will be updated
---> Package python-libs.x86_64 0:2.7.5-69.el7_5 will be an update
--> Finished Dependency Resolution
--> Finding unneeded leftover dependencies
Found and removing 0 unneeded dependencies
Error: Package: tkinter-2.7.5-68.el7.x86_64 (@rhel-7-server-optional-rpms)
Requires: python = 2.7.5-68.el7
Removing: python-2.7.5-68.el7.x86_64 (@rhel-7-server-rpms)
python = 2.7.5-68.el7
Updated By: python-2.7.5-69.el7_5.x86_64 (rhel-7-server-rpms)
python = 2.7.5-69.el7_5
Available: python-2.7.5-16.el7.x86_64 (rhel-7-server-rpms)
python = 2.7.5-16.el7
Available: python-2.7.5-18.el7_1.1.x86_64 (rhel-7-server-rpms)
python = 2.7.5-18.el7_1.1
Available: python-2.7.5-34.el7.x86_64 (rhel-7-server-rpms)
python = 2.7.5-34.el7
Available: python-2.7.5-38.el7_2.x86_64 (rhel-7-server-rpms)
python = 2.7.5-38.el7_2
Available: python-2.7.5-39.el7_2.x86_64 (rhel-7-server-rpms)
python = 2.7.5-39.el7_2
Available: python-2.7.5-48.el7.x86_64 (rhel-7-server-rpms)
python = 2.7.5-48.el7
Available: python-2.7.5-58.el7.x86_64 (rhel-7-server-rpms)
python = 2.7.5-58.el7
**********************************************************************
yum can be configured to try to resolve such errors by temporarily enabling
disabled repos and searching for missing dependencies.
To enable this functionality please set 'notify_only=0' in /etc/yum/pluginconf.d/search-disabled-repos.conf
**********************************************************************
Error: Package: tkinter-2.7.5-68.el7.x86_64 (@rhel-7-server-optional-rpms)
Requires: python = 2.7.5-68.el7
Removing: python-2.7.5-68.el7.x86_64 (@rhel-7-server-rpms)
python = 2.7.5-68.el7
Updated By: python-2.7.5-69.el7_5.x86_64 (rhel-7-server-rpms)
python = 2.7.5-69.el7_5
Available: python-2.7.5-16.el7.x86_64 (rhel-7-server-rpms)
python = 2.7.5-16.el7
Available: python-2.7.5-18.el7_1.1.x86_64 (rhel-7-server-rpms)
python = 2.7.5-18.el7_1.1
Available: python-2.7.5-34.el7.x86_64 (rhel-7-server-rpms)
python = 2.7.5-34.el7
Available: python-2.7.5-38.el7_2.x86_64 (rhel-7-server-rpms)
python = 2.7.5-38.el7_2
Available: python-2.7.5-39.el7_2.x86_64 (rhel-7-server-rpms)
python = 2.7.5-39.el7_2
Available: python-2.7.5-48.el7.x86_64 (rhel-7-server-rpms)
python = 2.7.5-48.el7
Available: python-2.7.5-58.el7.x86_64 (rhel-7-server-rpms)
python = 2.7.5-58.el7
I don't understand what the errors mean. Looks like yum is trying to update python from 2.7.5-68 to 2.7.5-69, and I don't see why that's a problem. What am I missing and how do I troubleshoot this? Thanks!
Did you run "sudo yum makecache fast" first? That solves a lot of issues.
The complaint is that the older tkinter requires the older python. You might try "sudo yum update python tkinter" so it knows you're updating both (even though it SHOULD determine this itself). Failing that you could first "sudo yum remove tkinter" then do your "sudo yum update python" and finally reinstall with "sudo yum install tkinter".
Did you run "sudo yum makecache fast" first? That solves a lot of issues.
The complaint is that the older tkinter requires the older python. You might try "sudo yum update python tkinter" so it knows you're updating both (even though it SHOULD determine this itself). Failing that you could first "sudo yum remove tkinter" then do your "sudo yum update python" and finally reinstall with "sudo yum install tkinter".
Thanks @MensaWater for your very quick answer! I tried most of your suggestions and didn't work until the last one, which is to remove the tkinter package first. After removing it, I was able to update python with no problems.
However, when I run "sudo yum install tkinter" it says that there is no tkinter package! I don't use tkinter very often, but it is distressing that the tkinter package has disappeared... I tried "yum search tkinter" and it shows only Python 3 tkinters:
Starting with RHEL6 RedHat made a change where you have to add additional repositories to get other packages. This is true in RHEL7.
On RHEL7.5 python is in rhel-7-server-rpms but tkinter is in rhel-7-server-optional-rpms.
You can see which repos are enabled with "sudo subscription-manager repos --list-enabled" which should output something like:
Quote:
+----------------------------------------------------------+
Available Repositories in /etc/yum.repos.d/redhat.repo
+----------------------------------------------------------+
Repo ID: rhel-7-server-rpms
Repo Name: Red Hat Enterprise Linux 7 Server (RPMs)
Repo URL: https://cdn.redhat.com/content/dist/rhel/server/7/$releasever/$basear
ch/os
Enabled: 1
Repo ID: rhel-7-server-optional-rpms
Repo Name: Red Hat Enterprise Linux 7 Server - Optional (RPMs)
Repo URL: https://cdn.redhat.com/content/dist/rhel/server/7/$releasever/$basear
ch/optional/os
Enabled: 1
If rhel-7-server-optional-rpms isn't shown you can enable it with:
"sudo subscription-manager repos --enable rhel-7-server-optional-rpms"
It is likely the lack of the repo that caused your earlier issue. It couldn't find the update.
FYI:
You can see all possible repos with just "sudo subscription-manager repos --list" Repositories with Enabled value 0 are disabled and be enabled using similar syntax.
Starting with RHEL6 RedHat made a change where you have to add additional repositories to get other packages. This is true in RHEL7.
On RHEL7.5 python is in rhel-7-server-rpms but tkinter is in rhel-7-server-optional-rpms.
You can see which repos are enabled with "sudo subscription-manager repos --list-enabled" which should output something like:
If rhel-7-server-optional-rpms isn't shown you can enable it with:
"sudo subscription-manager repos --enable rhel-7-server-optional-rpms"
It is likely the lack of the repo that caused your earlier issue. It couldn't find the update.
FYI:
You can see all possible repos with just "sudo subscription-manager repos --list" Repositories with Enabled value 0 are disabled and be enabled using similar syntax.
Success! I tried "sudo subscription-manager repos --enable rhel-7-server-optional-rpms" and that did the trick and I was able to reinstall the tkinter package. I guess tkinter was moved into the "optional-rpms" repository fairly recently (since I installed it without enabling "optional-rpms" in the past)?
Anyway, thank you so much for your help. Marking as solved.
I guess tkinter was moved into the "optional-rpms" repository fairly recently (since I installed it without enabling "optional-rpms" in the past)?
It may be you got tkinter from the original installation of OS. Or if you had the rpm downloaded you could have installed with "rpm -i" bypassing yum altogether.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.