Leap 15.0 Cinnamon 报错:libgio-2_0-0 undefined symbol: g_utf8_validate_len

我用你的工具也给cinnamon-settings试了一下:

./consistent-repo -p cinnamon-settings -r openSUSE-Leap-15.0-Oss
2019/02/26 21:21:18 Found these packages installed:
2019/02/26 21:21:18 ======================
2019/02/26 21:21:18 	cinnamon-settings-daemon
2019/02/26 21:21:18 	cinnamon-settings-daemon-devel
2019/02/26 21:21:18 	cinnamon-settings-daemon-lang
2019/02/26 21:21:18 ======================
2019/02/26 21:21:18 Processing cinnamon-settings-daemon ...
2019/02/26 21:21:20 Ok.
2019/02/26 21:21:20 Processing cinnamon-settings-daemon-devel ...
2019/02/26 21:21:22 Ok.
2019/02/26 21:21:22 Processing cinnamon-settings-daemon-lang ...
2019/02/26 21:21:23 Ok.

然后再次尝试运行,还是原先的错误信息

ImportError: /usr/lib64/libgio-2.0.so.0: undefined symbol: g_utf8_validate_len

另外每次我运行cinnamon-settings的时候或者用firefox浏览器的时候,我的xfce panel几乎每秒闪烁一次……

rpm -qf usr/share/cinnamon/cinnamon-settings/cinnamon-settings.py

看看 cinnamon-settings.py 属于哪个包,然后 zypper info 包名。

修改了一下:
rpm -qf /usr/bin/cinnamon-settings
得到cinnamon-3.6.7-lp150.3.3.1.x86_64
之后执行
sudo zypper install --force cinnamon-3.6.7-lp150.3.3.1.x86_64
成功之后
再执行cinnamon-settings
还是得到:
cinnamon-settings
Traceback (most recent call last):
File “/usr/share/cinnamon/cinnamon-settings/cinnamon-settings.py”, line 18, in
import gi
File “/usr/lib64/python2.7/site-packages/gi/init.py”, line 42, in
from . import _gi
ImportError: /usr/lib64/libgio-2.0.so.0: undefined symbol: g_utf8_validate_len

直接在/usr/bin下执行python3 cinnamon-settings ,也是一样。

zypper se -iv libgio-2_0-0

运行 zypper se -iv libgio-2_0-0
得到:
Loading repository data…
Reading installed packages…

S | Name | Type | Version | Arch | Repository
—±-------------------±------±-------------------±-------±-------------------------
i+ | libgio-2_0-0 | pac-> | 2.54.3-lp150.3.6.1 | x86_64 | openSUSE-Leap-15.0-Update
name: libgio-2_0-0
i+ | libgio-2_0-0-32bit | pac-> | 2.54.3-lp150.3.6.1 | x86_64 | openSUSE-Leap-15.0-Update
name: libgio-2_0-0-32bit
之后执行

sudo zypper install --force libgio-2_0-0
sudo zypper install --force libgio-2_0-0-32bit
完成之后再执行
cinnamon-settings
仍然得到错误信息

Traceback (most recent call last):
File “/usr/share/cinnamon/cinnamon-settings/cinnamon-settings.py”, line 18, in
import gi
File “/usr/lib64/python2.7/site-packages/gi/init.py”, line 42, in
from . import _gi
ImportError: /usr/lib64/libgio-2.0.so.0: undefined symbol: g_utf8_validate_len

其实之前我用YaST --> software managment搜索libgio搜到的也是这两个包,重装之后还是一样。

现在的问题是
cinnamon-settings
gnome-tweak-tool
都用不了。错误信息完全一致:

Traceback (most recent call last):
 File “/usr/bin/gnome-tweak-tool”, line 24, in <module>
   import gi
 File “/usr/lib64/python3.6/site-packages/gi/init.py”, line 42, in <module>
   from . import _gi
ImportError: /usr/lib64/libgio-2.0.so.0: undefined symbol: g_utf8_validate_len

我现在的问题跟python下面的库有关。cinnamon-settings和 gnome-tweak-tool都是python写的。
我的机器装着python3.6,ipython7.1.1,在python3和ipython下面,import gi出现同样错误:
from . import _gi
ImportError: /usr/lib64/libgio-2.0.so.0: undefined symbol: g_utf8_validate_len
奇怪的是,我运行spyder,它是基于本地python和ipython的, 在spyder的console里面import gi是完全没问题的!

@swiatoslaw 我拆分了下帖子,yast 的问题已经解决了。

Cinnamon 的问题,我觉得不是你的错误,是推送更新推出来的 bug。我不巧也是 Cinnamon 的维护者 :joy: 所以还是我管。

你去 http://download.opensuse.org/distribution/leap/15.0/repo/oss/x86_64 里下载下原生的 Cinnamon 包用 oldpackage 方法降级下看看有没有问题。

如果没有的话就是更新造成的。如果依然有,可能就是你 python-gobject 相关的东西比如 glib2 之类的版本不对。

1赞

g_utf8_validate_len 这个函数是在 glib2 里,你用我的软件检查下你下列软件包的来源:

glib2
glib2-tools
libgio-2_0-0
libgio-fam
libglib-2_0-0
libgthread-2_0-0
libgmodule-2_0-0
libgobject-2_0-0
1赞

我依次运行了这些

运行 /usr/local/byMargueriteSu/./consistent-repo -p glib2 -r openSUSE-Leap-15.0-Oss
得到
2019/02/28 20:57:58 Found these packages installed:
2019/02/28 20:57:58 ======================
2019/02/28 20:57:58 glib2-devel
2019/02/28 20:57:58 glib2-lang
2019/02/28 20:57:58 glib2-tools
2019/02/28 20:57:58 libpackagekit-glib2-18
2019/02/28 20:57:58 ======================
2019/02/28 20:57:58 Processing glib2-devel …
2019/02/28 20:58:00 ===================
2019/02/28 20:58:00 Package not from repository ‘openSUSE-Leap-15.0-Oss’: glib2-devel
2019/02/28 20:58:00 please run 'zypper --no-refresh se -v ’ and 'zypper --no-refresh info ’ to verify.
2019/02/28 20:58:00 ===================
2019/02/28 20:58:00 Processing glib2-lang …
2019/02/28 20:58:01 ===================
2019/02/28 20:58:01 Package not from repository ‘openSUSE-Leap-15.0-Oss’: glib2-lang
2019/02/28 20:58:01 please run 'zypper --no-refresh se -v ’ and 'zypper --no-refresh info ’ to verify.
2019/02/28 20:58:01 ===================
2019/02/28 20:58:01 Processing glib2-tools …
2019/02/28 20:58:03 ===================
2019/02/28 20:58:03 Package not from repository ‘openSUSE-Leap-15.0-Oss’: glib2-tools
2019/02/28 20:58:03 please run 'zypper --no-refresh se -v ’ and 'zypper --no-refresh info ’ to verify.
2019/02/28 20:58:03 ===================
2019/02/28 20:58:03 Processing libpackagekit-glib2-18 …
2019/02/28 20:58:05 ===================
2019/02/28 20:58:05 Package not from repository ‘openSUSE-Leap-15.0-Oss’: libpackagekit-glib2-18
2019/02/28 20:58:05 please run 'zypper --no-refresh se -v ’ and 'zypper --no-refresh info ’ to verify.
2019/02/28 20:58:05 ===================

运行 /usr/local/byMargueriteSu/./consistent-repo -p libgio-2_0-0 -r openSUSE-Leap-15.0-Oss
得到
2019/02/28 21:01:48 Found these packages installed:
2019/02/28 21:01:48 ======================
2019/02/28 21:01:48 libgio-2_0-0
2019/02/28 21:01:48 libgio-2_0-0-32bit
2019/02/28 21:01:48 ======================
2019/02/28 21:01:48 Processing libgio-2_0-0 …
2019/02/28 21:01:49 ===================
2019/02/28 21:01:49 Package not from repository ‘openSUSE-Leap-15.0-Oss’: libgio-2_0-0
2019/02/28 21:01:49 please run 'zypper --no-refresh se -v ’ and 'zypper --no-refresh info ’ to verify.
2019/02/28 21:01:49 ===================
2019/02/28 21:01:49 Processing libgio-2_0-0-32bit …
2019/02/28 21:01:51 ===================
2019/02/28 21:01:51 Package not from repository ‘openSUSE-Leap-15.0-Oss’: libgio-2_0-0-32bit
2019/02/28 21:01:51 please run 'zypper --no-refresh se -v ’ and 'zypper --no-refresh info ’ to verify.
2019/02/28 21:01:51 ===================

运行 /usr/local/byMargueriteSu/./consistent-repo -p libgio-fam -r openSUSE-Leap-15.0-Oss
得到 2019/02/28 21:02:41 exit status 104

运行 /usr/local/byMargueriteSu/./consistent-repo -p libglib-2_0-0 -r openSUSE-Leap-15.0-Oss
得到
2019/02/28 21:03:11 Found these packages installed:
2019/02/28 21:03:11 ======================
2019/02/28 21:03:11 libglib-2_0-0
2019/02/28 21:03:11 libglib-2_0-0-32bit
2019/02/28 21:03:11 ======================
2019/02/28 21:03:11 Processing libglib-2_0-0 …
2019/02/28 21:03:13 ===================
2019/02/28 21:03:13 Package not from repository ‘openSUSE-Leap-15.0-Oss’: libglib-2_0-0
2019/02/28 21:03:13 please run 'zypper --no-refresh se -v ’ and 'zypper --no-refresh info ’ to verify.
2019/02/28 21:03:13 ===================
2019/02/28 21:03:13 Processing libglib-2_0-0-32bit …
2019/02/28 21:03:15 ===================
2019/02/28 21:03:15 Package not from repository ‘openSUSE-Leap-15.0-Oss’: libglib-2_0-0-32bit
2019/02/28 21:03:15 please run 'zypper --no-refresh se -v ’ and 'zypper --no-refresh info ’ to verify.
2019/02/28 21:03:15 ===================

运行 /usr/local/byMargueriteSu/./consistent-repo -p libgthread-2_0-0 -r openSUSE-Leap-15.0-Oss
得到
2019/02/28 21:03:55 Found these packages installed:
2019/02/28 21:03:55 ======================
2019/02/28 21:03:55 libgthread-2_0-0
2019/02/28 21:03:55 ======================
2019/02/28 21:03:55 Processing libgthread-2_0-0 …
2019/02/28 21:03:57 ===================
2019/02/28 21:03:57 Package not from repository ‘openSUSE-Leap-15.0-Oss’: libgthread-2_0-0
2019/02/28 21:03:57 please run 'zypper --no-refresh se -v ’ and 'zypper --no-refresh info ’ to verify.
2019/02/28 21:03:57 ===================

运行 /usr/local/byMargueriteSu/./consistent-repo -p libgmodule-2_0-0 -r openSUSE-Leap-15.0-Oss
得到
2019/02/28 21:04:28 Found these packages installed:
2019/02/28 21:04:28 ======================
2019/02/28 21:04:28 libgmodule-2_0-0
2019/02/28 21:04:28 libgmodule-2_0-0-32bit
2019/02/28 21:04:28 ======================
2019/02/28 21:04:28 Processing libgmodule-2_0-0 …
2019/02/28 21:04:30 ===================
2019/02/28 21:04:30 Package not from repository ‘openSUSE-Leap-15.0-Oss’: libgmodule-2_0-0
2019/02/28 21:04:30 please run 'zypper --no-refresh se -v ’ and 'zypper --no-refresh info ’ to verify.
2019/02/28 21:04:30 ===================
2019/02/28 21:04:30 Processing libgmodule-2_0-0-32bit …
2019/02/28 21:04:31 ===================
2019/02/28 21:04:31 Package not from repository ‘openSUSE-Leap-15.0-Oss’: libgmodule-2_0-0-32bit
2019/02/28 21:04:31 please run 'zypper --no-refresh se -v ’ and 'zypper --no-refresh info ’ to verify.
2019/02/28 21:04:31 ===================

运行 /usr/local/byMargueriteSu/./consistent-repo -p libgobject-2_0-0 -r openSUSE-Leap-15.0-Oss
得到
2019/02/28 21:04:49 Found these packages installed:
2019/02/28 21:04:49 ======================
2019/02/28 21:04:49 libgobject-2_0-0
2019/02/28 21:04:49 libgobject-2_0-0-32bit
2019/02/28 21:04:49 ======================
2019/02/28 21:04:49 Processing libgobject-2_0-0 …
2019/02/28 21:04:51 ===================
2019/02/28 21:04:51 Package not from repository ‘openSUSE-Leap-15.0-Oss’: libgobject-2_0-0
2019/02/28 21:04:51 please run 'zypper --no-refresh se -v ’ and 'zypper --no-refresh info ’ to verify.
2019/02/28 21:04:51 ===================
2019/02/28 21:04:51 Processing libgobject-2_0-0-32bit …
2019/02/28 21:04:52 ===================
2019/02/28 21:04:52 Package not from repository ‘openSUSE-Leap-15.0-Oss’: libgobject-2_0-0-32bit
2019/02/28 21:04:52 please run 'zypper --no-refresh se -v ’ and 'zypper --no-refresh info ’ to verify.
2019/02/28 21:04:52 ===================

你就重装提示的包应该就行了

我执行了这句
sudo zypper install --force glib2 glib2-tools libgio-2_0-0 libgio-fam libglib-2_0-0 libgthread-2_
0-0 libgmodule-2_0-0 libgobject-2_0-0 glib2-devel glib2-lang glib2-tools libpackagekit-glib2-18 libgmodu
le-2_0-0-32bit libgobject-2_0-0-32bit libgio-2_0-0-32bit

结果gnome-tweak-tool和cinnamon-settings仍然不能启动
不过报错信息不一样了。

gnome-tweak-tool

gnome-tweak-tool

** (process:4846): WARNING **: Failed to load shared library ‘libpango-1.0.so.0’ referenced by the typel
ib: /usr/lib64/libpango-1.0.so.0: undefined symbol: g_log_structured_standard
Traceback (most recent call last):
 File “/usr/bin/gnome-tweak-tool”, line 84, in <module>
   from gtweak.app import GnomeTweakTool
 File “/usr/lib/python3.6/site-packages/gtweak/app.py”, line 20, in <module>
   from gi.repository import Gtk
 File “<frozen importlib._bootstrap>”, line 971, in _find_and_load
 File “<frozen importlib._bootstrap>”, line 955, in _find_and_load_unlocked
 File “<frozen importlib._bootstrap>”, line 656, in _load_unlocked
 File “<frozen importlib._bootstrap>”, line 626, in _load_backward_compatible
 File “/usr/lib64/python3.6/site-packages/gi/importer.py”, line 145, in load_module
   importlib.import_module(‘gi.repository.’ + dep.split(“-”)[0])
 File “/usr/lib64/python3.6/importlib/init.py”, line 126, in import_module
   return _bootstrap._gcd_import(name[level:], package, level)
 File “<frozen importlib._bootstrap>”, line 994, in _gcd_import
 File “<frozen importlib._bootstrap>”, line 971, in _find_and_load
 File “<frozen importlib._bootstrap>”, line 955, in _find_and_load_unlocked
 File “<frozen importlib._bootstrap>”, line 656, in _load_unlocked
 File “<frozen importlib._bootstrap>”, line 626, in _load_backward_compatible
 File “/usr/lib64/python3.6/site-packages/gi/importer.py”, line 145, in load_module
   importlib.import_module(‘gi.repository.’ + dep.split(“-”)[0])
 File “/usr/lib64/python3.6/importlib/init.py”, line 126, in import_module
   return _bootstrap._gcd_import(name[level:], package, level)
 File “<frozen importlib._bootstrap>”, line 994, in _gcd_import
 File “<frozen importlib._bootstrap>”, line 971, in _find_and_load
 File “<frozen importlib._bootstrap>”, line 955, in _find_and_load_unlocked
 File “<frozen importlib._bootstrap>”, line 656, in _load_unlocked
 File “<frozen importlib._bootstrap>”, line 626, in _load_backward_compatible
 File “/usr/lib64/python3.6/site-packages/gi/importer.py”, line 146, in load_module
   dynamic_module = load_overrides(introspection_module)
 File “/usr/lib64/python3.6/site-packages/gi/overrides/init.py”, line 125, in load_overrides
   override_mod = importlib.import_module(override_package_name)
 File “/usr/lib64/python3.6/importlib/init.py”, line 126, in import_module
   return _bootstrap._gcd_import(name[level:], package, level)
 File “/usr/lib64/python3.6/site-packages/gi/overrides/Pango.py”, line 41, in <module>
   FontDescription = override(FontDescription)
 File “/usr/lib64/python3.6/site-packages/gi/overrides/init.py”, line 202, in override
   assert g_type != TYPE_NONE
AssertionError

执行cinnamon-settings,报错信息是

                                                                                                                                                                                        
** (process:4849): WARNING **: Failed to load shared library ‘libpango-1.0.so.0’ referenced by the typelib: /usr/lib64/libpango-1.0.so.0: undefined symbol: g_log_structured_standard    
Traceback (most recent call last):                                                                                                                                                       
 File “/usr/share/cinnamon/cinnamon-settings/cinnamon-settings.py”, line 21, in <module>                                                                                                
   from gi.repository import Gio, Gtk, Pango, Gdk, XApp                                                                                                                                 
 File “/usr/lib64/python2.7/site-packages/gi/importer.py”, line 145, in load_module                                                                                                     
   importlib.import_module(‘gi.repository.’ + dep.split(“-”)[0])                                                                                                                        
 File “/usr/lib64/python2.7/importlib/init.py”, line 37, in import_module                                                                                                           
   import(name)                                                                                                                                                                     
 File “/usr/lib64/python2.7/site-packages/gi/importer.py”, line 145, in load_module                                                                                                     
   importlib.import_module(‘gi.repository.’ + dep.split(“-”)[0])                                                                                                                        
 File “/usr/lib64/python2.7/importlib/init.py”, line 37, in import_module                                                                                                           
   import(name)                                                                                                                                                                     
 File “/usr/lib64/python2.7/site-packages/gi/importer.py”, line 146, in load_module                                                                                                     
   dynamic_module = load_overrides(introspection_module)                                                                                                                                
 File “/usr/lib64/python2.7/site-packages/gi/overrides/init.py”, line 125, in load_overrides                                                                                        
   override_mod = importlib.import_module(override_package_name)
 File “/usr/lib64/python2.7/importlib/init.py”, line 37, in import_module
   import(name)
 File “/usr/lib64/python2.7/site-packages/gi/overrides/Pango.py”, line 41, in <module>
   FontDescription = override(FontDescription)
 File “/usr/lib64/python2.7/site-packages/gi/overrides/init.py”, line 202, in override
   assert g_type != TYPE_NONE

#####################################
现在又出了一个更奇怪的问题:

xfce桌面进不去了。在sddm输入密码登录之后自动退出来
似乎更libpang有关系。

现在所有的gtk桌面全都进不去了
gnome xfce和cinnamon

你的 libpango-1_0-0 也得重装

我用你的软件做了这么一步检查
./consistent-repo -p libpango-1_0-0 -r openSUSE-Leap-15
.0-Oss
得到
2019/03/02 11:36:04 Found these packages installed:
2019/03/02 11:36:04 ======================
2019/03/02 11:36:04     libpango-1_0-0
2019/03/02 11:36:04     libpango-1_0-0-32bit
2019/03/02 11:36:04 ======================
2019/03/02 11:36:04 Processing libpango-1_0-0 …
2019/03/02 11:36:05 ===================
2019/03/02 11:36:05 Package not from repository ‘openSUSE-Leap-15.0-Oss’: libpango-1_0-0
2019/03/02 11:36:05 please run ‘zypper --no-refresh se -v <pkg>’ and ‘zypper --no-refresh info <pkg>’ to
verify.
2019/03/02 11:36:05 ===================
2019/03/02 11:36:05 Processing libpango-1_0-0-32bit …
2019/03/02 11:36:07 ===================
2019/03/02 11:36:07 Package not from repository ‘openSUSE-Leap-15.0-Oss’: libpango-1_0-0-32bit
2019/03/02 11:36:07 please run ‘zypper --no-refresh se -v <pkg>’ and ‘zypper --no-refresh info <pkg>’ to
verify.
2019/03/02 11:36:07 ===================

于是我做了这一步
sudo zypper install --force libpango-1_0-0 libpango-1_0
-0-32bit

得到
** (gnome-tweak-tool:8747): WARNING **: Failed to load shared library ‘libatk-1.0.so.0’ referenced by th
e typelib: /usr/lib64/libatk-1.0.so.0: undefined symbol: g_log_structured_standard
Traceback (most recent call last):
 File “/usr/bin/gnome-tweak-tool”, line 84, in <module>
   from gtweak.app import GnomeTweakTool
 File “/usr/lib/python3.6/site-packages/gtweak/app.py”, line 20, in <module>
   from gi.repository import Gtk
 File “<frozen importlib._bootstrap>”, line 971, in _find_and_load
 File “<frozen importlib._bootstrap>”, line 955, in _find_and_load_unlocked
 File “<frozen importlib._bootstrap>”, line 656, in _load_unlocked
 File “<frozen importlib._bootstrap>”, line 626, in _load_backward_compatible
 File “/usr/lib64/python3.6/site-packages/gi/importer.py”, line 146, in load_module
   dynamic_module = load_overrides(introspection_module)
 File “/usr/lib64/python3.6/site-packages/gi/overrides/init.py”, line 125, in load_overrides
   override_mod = importlib.import_module(override_package_name)
 File “/usr/lib64/python3.6/importlib/init.py”, line 126, in import_module
   return _bootstrap.gcd_import(name[level:], package, level)
 File “/usr/lib64/python3.6/site-packages/gi/overrides/Gtk.py”, line 118, in <module>
   class Widget(Gtk.Widget):
 File “/usr/lib64/python3.6/site-packages/gi/module.py”, line 181, in getattr
   interfaces = tuple(interface for interface in get_interfaces_for_object(info)
 File “/usr/lib64/python3.6/site-packages/gi/module.py”, line 105, in get_interfaces_for_object
   interfaces.append(getattr(module, name))
 File “/usr/lib64/python3.6/site-packages/gi/module.py”, line 220, in getattr
   wrapper = metaclass(name, bases, dict
)
 File “/usr/lib64/python3.6/site-packages/gi/types.py”, line 234, in init
   register_interface_info(cls.info.get_g_type())
TypeError: must be an interface

现在看来可能所有基于gtk的图形界面都出问题了。YaST2的图形界面又打不开了

要不干脆重装吧?不格式化直接装行么?是不是载入DVD以后进入upgrade?

就在我打算放弃的时候,我执行了这么几步,突然xfce能用了!yast2也能打开了!cinnamon-settiings和gnome-tweak-tool也都正常了!
先是执行
/usr/local/byMargueriteSu/./consistent-repo -p libgtk-3.so.0 -r openSUSE-Leap-15.0-Oss
然后
/usr/local/byMargueriteSu/./consistent-repo -p libatk-1.0.so.0 -r openSUSE-Leap-15.0-Oss
都是status 104
无奈,只保留第一个连字符之前的部分
/usr/local/byMargueriteSu/./consistent-repo -p libatk -r openSUSE-Leap-15.0-Oss
/usr/local/byMargueriteSu/./consistent-repo -p libgtk -r openSUSE-Leap-15.0-Oss
根据上面两部的输出
sudo zypper install --force libatk-1_0-0 libatk-1_0-0-32bit libatk-bridge-2_0-0 libatk-bridge-2_0-0-32bit libatkmm-1_6-1 libgtk-2_0-0 libgtk-2_0-0-32bit libgtk-3-0 libgtk-3-0-32bit libgtk-vnc-2_0-0 libgtkmm-3_0-1 libgtksourceview-2_0-0 libgtksourceview-3_0-1 libgtkspell0 libgtkspell3-3-0
被问到是不是要downgrade一个包
好了!

隆重鸣谢Maguerite Su,一定请你吃饭,吃满汉全席。

本主题在最后一个回复创建后60分钟后自动锁定。不再允许添加新回复。