我无法从 Yast2 用户界面打开软件管理。
从终端打开后,su -
我可以看到这些错误:
penguin:\~ # yast2
QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-root
Run command: /sbin/yast2 sw_single
terminate called after throwing an instance of 'YUIPluginExceptio
what(): Couldn't load plug-in q
/sbin/yast2: line 455: 25386 Aborted (core dumped) $ybindir/y2start $module "$@" "$SELECTED_GUI" $Y2_GEOMETRY $Y2UI_ARGS
尝试使用 ncurses 界面,sudo yast2
尝试打开软件管理器后,我发现了一些问题:
无法加载插件 ncurses-pkg 检查日志文件!
然后
Error Internal error. Please report a bug report with logs. Run save_y2logs to get complete logs. Details: Opening package selector failed. Caller: /usr/share/YaST2/modules/PackagesUI.rb:316:in \RunPackageSelector'
但请注意:
$ _ zypper in libyui-ncurses-pkg8
Loading repository data...
Reading installed packages...
'libyui-ncurses-pkg8' is already installed.
No update candidate for 'libyui-ncurses-pkg8-2.48.5.2-lp150.2.3.1.x86_64'. The highest available version is already installed.
Resolving package dependencies...
Nothing to do.
和
_ zypper se libyui-ncurses
Loading repository data...
Reading installed packages...
S | Name | Summary | Type
---+--------------------------+-----------------------------------------------------------+-----------
| libyui-ncurses-devel | Libyui-ncurses header files | package
| libyui-ncurses-doc | Libyui-ncurses documentation | package
| libyui-ncurses-pkg | Libyui - yast2 package selector widget for the ncurses UI | srcpackage
| libyui-ncurses-pkg-devel | Libyui-ncurses-pkg header files | package
| libyui-ncurses-pkg-doc | Libyui-ncurses-pkg documentation | package
| libyui-ncurses-pkg-doc | Libyui-ncurses-pkg documentation | srcpackage
i+ | libyui-ncurses-pkg8 | Libyui - yast2 package selector widget for the ncurses UI | package
| libyui-ncurses-pkg9 | Libyui - yast2 package selector widget for the ncurses UI | package
| libyui-ncurses-tools | Libyui-ncurses tools | package
i+ | libyui-ncurses8 | Libyui - Character Based User Interface | package
i | libyui-ncurses9 | Libyui - Character Based User Interface | package
运行 save_y2logs 时创建的 tarball 包含很多文件。我不确定如何理解它们
详情请见:
$ _ zypper ls
# | Alias | Name | Enabled | GPG Check | Refresh | Type
---+-------------------------------------+-----------------------------------------+---------+-----------+---------+-------
1 | http-download.opensuse.org-17cfaabf | openSUSE:Factory | Yes | (r ) Yes | Yes | rpm-md
2 | openSUSE-Leap-15.0-1 | openSUSE-Leap-15.0-1 | Yes | (r ) Yes | Yes | rpm-md
3 | packman | packman | Yes | (r ) Yes | Yes | rpm-md
4 | repo-debug | openSUSE-Leap-15.0-Debug | No | ---- | ---- | NONE
5 | repo-debug-non-oss | openSUSE-Leap-15.0-Debug-Non-Oss | No | ---- | ---- | NONE
6 | repo-debug-update | openSUSE-Leap-15.0-Update-Debug | No | ---- | ---- | NONE
7 | repo-debug-update-non-oss | openSUSE-Leap-15.0-Update-Debug-Non-Oss | No | ---- | ---- | NONE
8 | repo-non-oss | openSUSE-Leap-15.0-Non-Oss | Yes | (r ) Yes | Yes | rpm-md
9 | repo-source | openSUSE-Leap-15.0-Source | No | ---- | ---- | NONE
10 | repo-source-non-oss | openSUSE-Leap-15.0-Source-Non-Oss | No | ---- | ---- | NONE
11 | repo-update | openSUSE-Leap-15.0-Update | Yes | (r ) Yes | Yes | rpm-md
12 | repo-update-non-oss | openSUSE-Leap-15.0-Update-Non-Oss | Yes | (r ) Yes | Yes | rpm-md
我跑了zypper clean
,zypper ref
,zypper up
答案1
因此,该openSUSE:Factory
存储库实际上是 Tumbleweed(不是 Leap)存储库,在更新软件包时,我最终处于两个发行版之间的某种混合状态,这导致许多东西被破坏。我不确定我是如何陷入这种状态的。但就是这样。
此时的选项是删除Factory
repo 并zypper dup
尝试重新安装 Leap(这不起作用)、使用回滚snapper
(这不起作用)或升级到 Tumbleweed,这似乎解决了我的问题。剩下的唯一选择是完全重新安装 Leap。
升级非常简单,按照以下文档操作即可: https://en.opensuse.org/openSUSE:Tumbleweed_upgrade
简单来说就是:
mkdir /etc/zypp/repos.d/old
mv /etc/zypp/repos.d/*.repo /etc/zypp/repos.d/old
删除并备份我之前使用的旧仓库
zypper ar -f -c http://download.opensuse.org/tumbleweed/repo/oss repo-oss
zypper ar -f -c http://download.opensuse.org/tumbleweed/repo/non-oss repo-non-oss
zypper ar -f -c http://download.opensuse.org/tumbleweed/repo/debug repo-debug
zypper ar -f -c http://download.opensuse.org/update/tumbleweed/ repo-update
添加正确的 Tumbleweed 存储库
zypper dup
升级。一如既往:在发行版升级之前备份。但我没有遇到任何直接或明显的数据丢失问题。
答案2
尽管 OP 能够通过系统升级解决这个问题和其他问题,但更有针对性的修复是调查y2log
(也被复制到问题中提到的档案中):
sudo cat /var/log/YaST2/y2log
根据问题中提供的信息,对于 OP 来说,这几乎肯定会表明软件管理正在寻找 YUI 9,而实际上只安装了 YUI 8。可以通过从命令行升级相应的软件包来解决该问题:
sudo zypper install libyui-qt9 libyui-qt-pkg9
ncurses
对于任何想要使用 TUI 的人来说,类似的修复都会有所帮助。