Bug 1172809

Summary: Failed to load Module 'Packages' due to: cannot load such file -- solv
Product: [openSUSE] openSUSE Tumbleweed Reporter: Erdi KARA <erdi_kara88>
Component: YaST2Assignee: E-mail List <yast2-maintainers>
Status: RESOLVED FIXED QA Contact: Jiri Srain <jsrain>
Severity: Major    
Priority: P5 - None CC: bluedzins, dgonzalez, erdi_kara88, jlopez
Version: Current   
Target Milestone: ---   
Hardware: 64bit   
OS: UNIX Other   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Attachments: Detailed bug report
yast2 logs

Description Erdi KARA 2020-06-10 16:29:04 UTC
Created attachment 838677 [details]
Detailed bug report

Internal error. Please report a bug report with logs.
Run save_y2logs to get complete logs.

Caller: /usr/lib64/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:92:in `require'

Details: Failed to load Module 'Packages' due to: cannot load such file -- solv

I can not access repositories through YAst
Comment 1 José Iván López González 2020-06-11 14:17:47 UTC
I have tried with exactly the same Tumbleweed snapshot (20200609) and I can go to the repositories tab in the Software Management client and also I can access to the Software Repositories client.

Do you have ruby-solv installed in your system? Could you please indicate what steps you follow to reproduce the error?

Thanks for reporting!
Comment 2 Erdi KARA 2020-06-12 01:01:41 UTC
Hi

I used the Yast interface and click on software management or software repositories. After that it give me that error message I attached the report. Then I run

sudo save_y2logs

to produce the error logs. As for ruby-solv, I tried to install it but it requires lots of other installation or deinstallation. How should I proceed? Thank you!
Comment 3 José Iván López González 2020-06-12 09:44:33 UTC
YaST Packager is not able to work without ruby-solv. It is a strong dependency. I don't know why you have yast2-packager but not ruby-solv in your system. Do you manually refused to install it during some TW update?

Please, try to install ruby-solv, that should fix the issue. Tell us if that worked for your. Thanks!
Comment 4 Erdi KARA 2020-06-12 16:37:14 UTC
(In reply to José Iván López González from comment #3)
> YaST Packager is not able to work without ruby-solv. It is a strong
> dependency. I don't know why you have yast2-packager but not ruby-solv in
> your system. Do you manually refused to install it during some TW update?
> 
> Please, try to install ruby-solv, that should fix the issue. Tell us if that
> worked for your. Thanks!

well I manually installed ruby-solve but it did not solve the problem. Then I tried zypper dup, it downgraded some packages etc and the problem's solved for now. I can safely access  software management or software repositories through yast
Comment 5 José Iván López González 2020-06-15 07:26:17 UTC
(In reply to Erdi KARA from comment #4)
> 
> well I manually installed ruby-solve but it did not solve the problem. Then
> I tried zypper dup, it downgraded some packages etc and the problem's solved
> for now. I can safely access  software management or software repositories
> through yast

Ok, thanks for your feedback. It does not look like a YaST problem but something weird with the dependencies and the upgrade process. I will close this bug due to now it works for you. Don't hesitate to report again if you find anything else.

Thanks!
Comment 6 macias - 2020-08-24 19:21:31 UTC
Reopening because this is a bug with dependencies and it would be great to see it fixed. Sure, you can manually upgrade parts of the system (if you know the root of the problem), but this is not a fix.

Anyway, I hit the same problem, so I updated yast2-packager using zypper. It didn't fix anything.

So I run "zypper dup", it showed 10 problems:
Problem: problem with installed package libavcodec58-4.2.1-5.2.x86_64
Problem: problem with installed package libavdevice58-4.2.1-5.2.x86_64
Problem: problem with installed package libavfilter7-4.2.1-5.2.x86_64
Problem: problem with installed package libavformat58-4.2.1-5.2.x86_64
Problem: problem with installed package libavutil56-4.2.1-5.2.x86_64
Problem: problem with installed package libpostproc55-4.2.1-5.2.x86_64
Problem: problem with installed package libswresample3-4.2.1-5.2.x86_64
Problem: problem with installed package libswscale5-4.2.1-5.2.x86_64
Problem: problem with installed package mc-4.8.23-2.1.x86_64
Problem: problem with installed package liferea-1:1.13.0-1.fc33.x86_64

since I spent some time making video working, as well as mc, I didn't go this path. Instead I tried to post a bug report and I found this one with suggestion about ruby-solv (thank you José).

So I updated it (as it turned out to ruby-solv-0.7.14-1.2) and it did the trick. Finally I was able to run yast2 SM.

I would love to attach my yast2logs which I took before upgrading ruby-solv but when I do, I got this error:
The file at https://bugzilla.opensuse.org/attachment.cgi is not readable.
Comment 7 David Diaz 2020-08-24 21:36:50 UTC
(In reply to macias - from comment #6)
> [...]
> 
> Anyway, I hit the same problem, so I updated yast2-packager using zypper. It
> didn't fix anything.

Hi Macias, thanks for letting us know about it. It is weird because, as Iván said in comment #3, ruby-solv is a dependency of yast2-packager[1]. Let's see if we can figure out what is going wrong there.

> 
> [...]
> 
> So I updated it (as it turned out to ruby-solv-0.7.14-1.2) and it did the
> trick. Finally I was able to run yast2 SM.
> 
> I would love to attach my yast2logs which I took before upgrading ruby-solv
> but when I do, I got this error:
> The file at https://bugzilla.opensuse.org/attachment.cgi is not readable.

Could you please try it again after changing the file permissions as described in https://en.opensuse.org/openSUSE:Report_a_YaST_bug#Firefox_fails_to_attach_the_.2Ftmp.2Fy2logs-.2A.tar.gz_that_I_saved_with_save_y2logs._Why.3F

Thanks in advance.

[1] https://github.com/yast/yast-packager/blob/2d0f49cf494b719dbd0b8081dc64c5b10323d1e5/package/yast2-packager.spec#L72
Comment 8 macias - 2020-08-25 05:58:51 UTC
Created attachment 841007 [details]
yast2 logs

Ah, forgot about permissions (error message caught me off guard :-). Thank you.
Comment 9 David Diaz 2020-08-25 11:51:10 UTC
Thanks for the logs, Macias.

AFAICS, your system had the ruby-solv 0.7.11 package installed before you updated it manually. Thus, this satisfied the dependency introduced in yast2-packager 4.2.17. However, most probably the ruby-solv 0.7.11 was installed when your system was using a previous Ruby version and its binaries were placed in a the default Ruby directory for such version. E.g., at /usr/lib64/ruby/vendor_ruby/2.5.0/x86_64-linux-gnu/solv.so

So, when your system tried to find it at Ruby 2.6 default directories it fails. That's why updating/reinstalling it solves the problem. The binary is placed in the right location for the current Ruby version.

Not sure if it is clear now what were going wrong, but I fear there is nothing that we can do to avoid this special scenario. Just remember that it is recommended[1] to use a dist-upgraded to keep openSUSE Tumbleweed updated to the latest snapshot, instead updating packages manually.

I'm going to close the issue again as fixed, but feel free to add more feedback and comments if you want.


[1] https://en.opensuse.org/Portal:Tumbleweed