Kivy 不工作,MESA-LOADER:无法打开虹膜和 swrast

发布于 2025-01-09 18:52:59 字数 2219 浏览 0 评论 0原文

我已经在 Ubuntu 21.10 上为我的 python 3.17 安装了 Kivy 2.1。 我正在使用一个简单的库测试该库,但有一些错误,它找不到 iris 和 swrast 库,请参阅下面的代码和错误并提出建议。感谢

代码:

"""
This is Mobile App designed to send email using Kivy lib.
"""

from kivy.app import App
from kivy.lang import Builder
from kivy.uix.screenmanager import ScreenManager, Screen

Builder.load_file("interface.kv")

class LoginScreen(Screen):
    pass

class RootWidget(ScreenManager):
    pass

class MainApp(App):
    def build(self):
        return RootWidget()

if __name__ == "__main__":
    MainApp().run()

运行后出错:python main.py

[INFO   ] [Logger      ] Record log in /home/fredbitenyo/.kivy/logs/kivy_22-02-25_11.txt [INFO   ] [Kivy      ] v2.1.0rc1 [INFO   ] [Kivy        ] Installed at "/home/fredbitenyo/Downloads/udemy/github_codes/kivy_env/lib/python3.7/site-packages/kivy/__init__.py" [INFO   ] [Python      ] v3.7.3 (default, Mar 27 2019, 22:11:17)  [GCC
7.3.0] [INFO   ] [Python      ] Interpreter at "/home/fredbitenyo/Downloads/udemy/github_codes/kivy_env/bin/python" [INFO   ] [Logger      ] Purge log fired. Processing... [INFO   ] [Logger      ] Purge finished! [INFO   ] [Factory     ] 189 symbols loaded [INFO   ] [Image       ] Providers: img_tex, img_dds, img_sdl2, img_pil (img_ffpyplayer ignored) [INFO   ] [Window      ] Provider: sdl2 libGL error: MESA-LOADER: failed to open iris: /usr/lib/dri/iris_dri.so: cannot open shared object file: No such file or directory (search paths /usr/lib/x86_64-linux-gnu/dri:\$${ORIGIN}/dri:/usr/lib/dri, suffix
_dri) libGL error: failed to load driver: iris libGL error: MESA-LOADER: failed to open swrast: /home/fredbitenyo/anaconda3/lib/libstdc++.so.6: version `GLIBCXX_3.4.29' not found (required by /usr/lib/dri/swrast_dri.so) (search paths /usr/lib/x86_64-linux-gnu/dri:\$${ORIGIN}/dri:/usr/lib/dri, suffix
_dri) libGL error: failed to load driver: swrast X Error of failed request:  BadValue (integer parameter out of range for operation)   Major opcode of failed request:  149 (GLX)   Minor opcode of failed request:  3 (X_GLXCreateContext)   Value in failed request:  0x0   Serial number of failed request:  100   Current serial number in output stream:  101```

I have installed Kivy 2.1 on Ubuntu 21.10 for my python 3.17.
Am testing the library with a simple and having some errors, it cannot find iris and swrast library, please see code and error below and advise. Thanks

Code:

"""
This is Mobile App designed to send email using Kivy lib.
"""

from kivy.app import App
from kivy.lang import Builder
from kivy.uix.screenmanager import ScreenManager, Screen

Builder.load_file("interface.kv")

class LoginScreen(Screen):
    pass

class RootWidget(ScreenManager):
    pass

class MainApp(App):
    def build(self):
        return RootWidget()

if __name__ == "__main__":
    MainApp().run()

Error after running: python main.py

[INFO   ] [Logger      ] Record log in /home/fredbitenyo/.kivy/logs/kivy_22-02-25_11.txt [INFO   ] [Kivy      ] v2.1.0rc1 [INFO   ] [Kivy        ] Installed at "/home/fredbitenyo/Downloads/udemy/github_codes/kivy_env/lib/python3.7/site-packages/kivy/__init__.py" [INFO   ] [Python      ] v3.7.3 (default, Mar 27 2019, 22:11:17)  [GCC
7.3.0] [INFO   ] [Python      ] Interpreter at "/home/fredbitenyo/Downloads/udemy/github_codes/kivy_env/bin/python" [INFO   ] [Logger      ] Purge log fired. Processing... [INFO   ] [Logger      ] Purge finished! [INFO   ] [Factory     ] 189 symbols loaded [INFO   ] [Image       ] Providers: img_tex, img_dds, img_sdl2, img_pil (img_ffpyplayer ignored) [INFO   ] [Window      ] Provider: sdl2 libGL error: MESA-LOADER: failed to open iris: /usr/lib/dri/iris_dri.so: cannot open shared object file: No such file or directory (search paths /usr/lib/x86_64-linux-gnu/dri:\${ORIGIN}/dri:/usr/lib/dri, suffix
_dri) libGL error: failed to load driver: iris libGL error: MESA-LOADER: failed to open swrast: /home/fredbitenyo/anaconda3/lib/libstdc++.so.6: version `GLIBCXX_3.4.29' not found (required by /usr/lib/dri/swrast_dri.so) (search paths /usr/lib/x86_64-linux-gnu/dri:\${ORIGIN}/dri:/usr/lib/dri, suffix
_dri) libGL error: failed to load driver: swrast X Error of failed request:  BadValue (integer parameter out of range for operation)   Major opcode of failed request:  149 (GLX)   Minor opcode of failed request:  3 (X_GLXCreateContext)   Value in failed request:  0x0   Serial number of failed request:  100   Current serial number in output stream:  101```

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

为人所爱 2025-01-16 18:52:59

解决问题,我刚刚删除了符号链接 /home/fredbitenyo/anaconda3/lib/libstdc++.so.6 -> libstdc++.so.6.0.25 造成了冲突,因为它指向较低版本。

fix the problem,i just removed the symbolic link /home/fredbitenyo/anaconda3/lib/libstdc++.so.6 -> libstdc++.so.6.0.25 that was creating the conflict since it was pointing to a lower version.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文