After what I thought would be a routine zypper dup last night Yast no longer works. I can open yast after entering the root password, but none of yast’s modules open when I click on them. For example, here’s what happens when I try to open the yast software repositories module after starting yast from a terminal:
yast2
QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-root'
Run command: /sbin/yast2 repositories &
/sbin/yast2: /usr/lib/YaST2/bin/y2start: /usr/bin/ruby.ruby2.6: bad interpreter: No such file or directory
Any advice would be appreciated. I tried running zypper dup again but all the packages are up to date, supposedly.
I find it puzzling, though, that something like »zypper dup« just clobbers a vital YaST dependency. (At the same time I hope this is the problem here, because it would be an easy fix. Fingers crossed.)
Thanks for the suggestions–I installed the suggested packages but Yast is still not working:
yast2
QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-root'
Run command: /sbin/yast2 repositories &
/sbin/yast2: /usr/lib/YaST2/bin/y2start: /usr/bin/ruby.ruby2.6: bad interpreter: No such file or directory
I’m not a developer so I don’t need Ruby apart from whatever function it serves in allowing Yast to run. Can I uninstall Ruby and then reinstall version 2.5?
su -c yast2
Password:
QStandardPaths: wrong ownership on runtime directory /run/user/1000, 1000 instead of 0
QStandardPaths: wrong ownership on runtime directory /run/user/1000, 1000 instead of 0
Run command: /sbin/yast2 repositories &
/sbin/yast2: /usr/lib/YaST2/bin/y2start: /usr/bin/ruby.ruby2.6: bad interpreter: No such file or directory
I get the same, but without that last line. And it works.
I notice that “/usr/bin/ruby.ruby2.6” has a recent date. It was probably installed or updated on yesterday’s update. Checking on another Tumbleweed that I have not yet updated, I see that file is not there.
Somehow you managed to update Yast but failed to install a required dependency.
zypper in ruby2.6
Loading repository data...
Reading installed packages...
'ruby2.6' is already installed.
No update candidate for 'ruby2.6-2.6.1-1.2.x86_64'. The highest available version is already installed.
Resolving package dependencies...
Nothing to do.
Yes, a forced reinstall (“zypper in -f ruby2.6”) seems like a good idea. And then try that “ldd” command to make sure that all of the required libraries are also there.
zypper in -f ruby2.6
Retrieving repository 'Packman Repository' metadata ...............[done]
Building repository 'Packman Repository' cache ....................[done]
Loading repository data...
Reading installed packages...
Forcing installation of 'ruby2.6-2.6.1-1.2.x86_64' from repository 'openSUSE:Factory'.
Resolving package dependencies...
The following package is going to be reinstalled:
ruby2.6
1 package to reinstall.
Overall download size: 0 B. Already cached: 3.7 MiB. No additional space
will be used or freed after the operation.
Continue? [y/n/...? shows all options] (y): y
In cache ruby2.6-2.6.1-1.2.x86_64.rpm
(1/1), 3.7 MiB ( 16.4 MiB unpacked)
Checking for file conflicts: ......................................[done]
(1/1) Installing: ruby2.6-2.6.1-1.2.x86_64 ........................[done]
Additional rpm output:
update-alternatives: using /usr/bin/rake.ruby.ruby2.6 to provide /usr/bin/rake.ruby2.6 (rake.ruby2.6) in auto mode
update-alternatives: using /usr/bin/rdoc.ruby.ruby2.6 to provide /usr/bin/rdoc.ruby2.6 (rdoc.ruby2.6) in auto mode
update-alternatives: using /usr/bin/ri.ruby.ruby2.6 to provide /usr/bin/ri.ruby2.6 (ri.ruby2.6) in auto mode
Then I tried the ldd command:
ldd ruby2.6
ldd: ./ruby2.6: No such file or directory
So I"n not sure if I used the right syntax for ldd. Anyway, Yast is working again, so reinstalling ruby2.6 worked–thank you!
I encountered more problems with Yast yesterday–some modules wouldn’t open; others would. I also noticed that the installed kernel was 4.20.4-1, instead of the kernel that was supposed to be installed during the upgrade–4.20.6-1, so something clearly went wrong when I did a zypper dup the other day.
I picked a snapshot from a week ago, booted into it, made sure everything worked, and confirmed the rollback with:
su - snapper rollback
, and rebooted. After a reboot everything was back to normal–all the yast modules that I tried worked, and the correct kernel was installed. Today I did another zypper dup, which brought in the 4.20.7-1 kernel along with kde plasma 5.15.
All in all I’m extremely impressed with opensuse. I don’t know if I could have performed such a clean and easy recovery with any other distro. So thank you, opensuse developers!
Glad everyting’s in working order again.
Just out of curiosity, though: which Ruby version(s) do you have now after the rollback? What do the following commands return on your installation now?
ruby -v
head -n 1 /usr/lib/YaST2/bin/y2start
If it’s still Ruby 2.6 with no problems, then I might be inclined to upgrade from Ruby 2.5.
Thanks!
Just out of curiosity, though: which Ruby version(s) do you have now after the rollback? What do the following commands return on your installation now?
Hi:
I to experience similar problems after zypper up last week. I run Leap 15.1 not Thumbelweed, nevertheless I hope to get some useful info.
So, every time I open the konsole as a user I get the error:
:~> bash
bash: mc: line 1: syntax error: unexpected end of file
bash: error importing function definition for `mc'
Running yast2 from konsole gives the following error:
# yast2
/bin/bash: mc: line 1: syntax error: unexpected end of file
/bin/bash: error importing function definition for `mc'
QStandardPaths: wrong ownership on runtime directory /run/user/1000, 1000 instead of 0
QStandardPaths: wrong ownership on runtime directory /run/user/1000, 1000 instead of 0
QStandardPaths: wrong ownership on runtime directory /run/user/1000, 1000 instead of 0
I entered commands as mentioned in previous comments:
And the worst thing is I can not run yast by clicking on icon in Plasma. The window pops up requesting a user password. I enter the correct password but same window pops up again, and again etc.
Any help would be greatly appreciated.