eaf 貌似不能和 centaur emacs 兼容?

@seagle0128 @manateelazycat 今天我尝试了一下 Centaur Emacs,无法在其中使用eaf

我在网上逛了一圈没找到答案,只好在这里劳烦各位了

我个人认为这不是系统的问题,因为我自己写的配置就可以正常运行EAF

  • Archlinux
  • Centaur Emacs 最新版
  • EAF 最新版

EAF配置

(add-to-list 'load-path "~/.emacs.d/site-package/emacs-application-framework")
(require 'eaf)
(require 'eaf-browser)
(require 'eaf-pdf-viewer)
(require 'eaf-markdown-previewer)
(require 'eaf-org-previewer)
(require 'eaf-image-viewer)
(require 'eaf-system-monitor)
(require 'eaf-music-player)
(use-package eaf
  :load-path "~/.emacs.d/site-package/emacs-application-framework"
  :custom
  (eaf-browser-continue-where-left-off t)
  (eaf-browser-enable-adblocker t)
  (browse-url-browser-function 'eaf-open-browser)
  (eaf-browser-translate-language "zh-CN")
  :config
  (defalias 'browse-web #'eaf-open-browser)
  :bind
  (("C-c mo" . eaf-open)
   ("C-c mb" . eaf-open-browser)
   ("C-c ms" . eaf-search-it)
   ("C-c b"  . eaf-open-bookmark)))

*eaf*报错

libGL error: MESA-LOADER: failed to open iris: /home/was/anaconda3/lib/python3.8/site-packages/PyQt5/../../../libstdc++.so.6: version `GLIBCXX_3.4.29' not found (required by /usr/lib/dri/iris_dri.so) (search paths /usr/lib/dri, suffix _dri)
libGL error: failed to load driver: iris
libGL error: MESA-LOADER: failed to open iris: /home/was/anaconda3/lib/python3.8/site-packages/PyQt5/../../../libstdc++.so.6: version `GLIBCXX_3.4.29' not found (required by /usr/lib/dri/iris_dri.so) (search paths /usr/lib/dri, suffix _dri)
libGL error: failed to load driver: iris
libGL error: MESA-LOADER: failed to open swrast: /home/was/anaconda3/lib/python3.8/site-packages/PyQt5/../../../libstdc++.so.6: version `GLIBCXX_3.4.29' not found (required by /usr/lib/dri/swrast_dri.so) (search paths /usr/lib/dri, suffix _dri)
libGL error: failed to load driver: swrast
WebEngineContext used before QtWebEngine::initialize() or OpenGL context creation failed.
Failed to create OpenGL context for format QSurfaceFormat(version 2.0, options QFlags<QSurfaceFormat::FormatOption>(), depthBufferSize 24, redBufferSize -1, greenBufferSize -1, blueBufferSize -1, alphaBufferSize -1, stencilBufferSize 8, samples 0, swapBehavior QSurfaceFormat::SwapBehavior(DefaultSwapBehavior), swapInterval 1, profile  QSurfaceFormat::OpenGLContextProfile(NoProfile)) 

Process *eaf* 已放弃 (core dumped)
libGL error: MESA-LOADER: failed to open iris: /home/was/anaconda3/lib/python3.8/site-packages/PyQt5/../../../libstdc++.so.6: version `GLIBCXX_3.4.29' not found (required by /usr/lib/dri/iris_dri.so) (search paths /usr/lib/dri, suffix _dri)
libGL error: failed to load driver: iris
libGL error: MESA-LOADER: failed to open iris: /home/was/anaconda3/lib/python3.8/site-packages/PyQt5/../../../libstdc++.so.6: version `GLIBCXX_3.4.29' not found (required by /usr/lib/dri/iris_dri.so) (search paths /usr/lib/dri, suffix _dri)
libGL error: failed to load driver: iris
libGL error: MESA-LOADER: failed to open swrast: /home/was/anaconda3/lib/python3.8/site-packages/PyQt5/../../../libstdc++.so.6: version `GLIBCXX_3.4.29' not found (required by /usr/lib/dri/swrast_dri.so) (search paths /usr/lib/dri, suffix _dri)
libGL error: failed to load driver: swrast
Traceback (most recent call last):
  File "/home/was/.emacs.d/site-package/emacs-application-framework/core/utils.py", line 50, in on_signal_received
    self._func(obj, *args, **kwargs)
  File "/home/was/.emacs.d/site-package/emacs-application-framework/eaf.py", line 237, in update_views
    view = View(self.buffer_dict[buffer_id], view_info)
KeyError: '199b-bf49-f767-c759-b5bf-9a88-52d6'
Traceback (most recent call last):
  File "/home/was/.emacs.d/site-package/emacs-application-framework/core/utils.py", line 50, in on_signal_received
    self._func(obj, *args, **kwargs)
  File "/home/was/.emacs.d/site-package/emacs-application-framework/eaf.py", line 237, in update_views
    view = View(self.buffer_dict[buffer_id], view_info)
KeyError: '199b-bf49-f767-c759-b5bf-9a88-52d6'
Traceback (most recent call last):
  File "/home/was/.emacs.d/site-package/emacs-application-framework/core/utils.py", line 50, in on_signal_received
    self._func(obj, *args, **kwargs)
  File "/home/was/.emacs.d/site-package/emacs-application-framework/eaf.py", line 237, in update_views
    view = View(self.buffer_dict[buffer_id], view_info)
KeyError: '199b-bf49-f767-c759-b5bf-9a88-52d6'

请用 install-eaf.py 脚本自动安装发行版中的pyqt5, 不要自己用其他方式安装pyqt5,readme已经说明了。

是按照 install-eaf.py 按照的 PyQt5

sudo pacman -S python-pyqt5

但是你报错日志显示的是anaconda3安装的呀

我从conda中删除了PyQt5, 可又提示无法找到PyQt了。我已经按照了`python-pyqt’了啊

Traceback (most recent call last):
  File "/home/was/.emacs.d/site-package/emacs-application-framework/eaf.py", line 25, in <module>
    from PyQt5 import QtWebEngineWidgets as NeverUsed # noqa
ModuleNotFoundError: No module named 'PyQt5'

Process *eaf* exited abnormally with code 1
Traceback (most recent call last):
  File "/home/was/.emacs.d/site-package/emacs-application-framework/eaf.py", line 25, in <module>
    from PyQt5 import QtWebEngineWidgets as NeverUsed # noqa
ModuleNotFoundError: No module named 'PyQt5'

Process *eaf* exited abnormally with code 1

我没有用 conda , 没法提供帮助,我强烈建议你不要用 conda 或者 pyenv 这些,会把事情搞的很复杂。

1 个赞

那问题很简单了,你在 conda 的环境里启动了 emacs,所有python 相关的都是用的 conda 里的
解决方案很简单,不要在conda 环境里启动 emacs