emacs-eaf / emacs-application-framework

EAF, an extensible framework that revolutionizes the graphical capabilities of Emacs
GNU General Public License v3.0
3.1k stars 234 forks source link

因为网络原因,运行 install-eaf.py 部分安装步骤失败,然后再次运行,总是跳过安装步骤,目前无法知道依赖是否安装完整。 #851

Closed zw963 closed 3 years ago

zw963 commented 3 years ago

当时失败的错误信息:

[EAF] Installing dependencies for installed applications
[EAF] Installing system dependencies
[EAF] Running sudo pacman -Sy --noconfirm python-qrcode aria2 python-qrcode filebrowser-bin fd python-qrcode python-qtconsole python-markdown taglib @ /home/zw963/Dropbox/common/.emacs.d/plugins/emacs-application-framework/eaf
:: Synchronizing package databases...
 core.db failed to download
error: failed retrieving file 'core.db' from mirrors.bfsu.edu.cn : OpenSSL SSL_connect: SSL_ERROR_SYSCALL in connection to mirrors.bfsu.edu.cn:443 
error: failed to synchronize all databases (download library error)

然后再次运行时,就直接跳过了上面的步骤,直接提示安装成功,但是其实这些包根本没有安装。

 ╰─ $ ./install-eaf.py 
[EAF] Running sudo pacman -Sy --noconfirm @ /home/zw963/Dropbox/common/.emacs.d/plugins/emacs-application-framework/eaf
:: Synchronizing package databases...
 core is up to date
 extra is up to date
 community is up to date
 multilib is up to date
 archlinuxcn is up to date
[EAF] ------------------------------------------
[EAF] Installing core dependencies
[EAF] Running sudo pacman -Sy --noconfirm wmctrl python-pyqt5 python-pyqt5-sip python-pyqtwebengine @ /home/zw963/Dropbox/common/.emacs.d/plugins/emacs-application-framework/eaf
:: Synchronizing package databases...
 core is up to date
 extra is up to date
 community is up to date
 multilib is up to date
 archlinuxcn is up to date
warning: wmctrl-1.07-6 is up to date -- reinstalling
warning: python-pyqt5-5.15.4-1 is up to date -- reinstalling
warning: python-pyqt5-sip-12.9.0-1 is up to date -- reinstalling
warning: python-pyqt5-webengine-5.15.4-1 is up to date -- reinstalling
resolving dependencies...
looking for conflicting packages...

Packages (4) python-pyqt5-5.15.4-1  python-pyqt5-sip-12.9.0-1  python-pyqt5-webengine-5.15.4-1  wmctrl-1.07-6

Total Installed Size:  27.46 MiB
Net Upgrade Size:       0.00 MiB

:: Proceed with installation? [Y/n] 
(4/4) checking keys in keyring                                                                                     [####################################################################] 100%
(4/4) checking package integrity                                                                                   [####################################################################] 100%
(4/4) loading package files                                                                                        [####################################################################] 100%
(4/4) checking for file conflicts                                                                                  [####################################################################] 100%
(4/4) checking available disk space                                                                                [####################################################################] 100%
:: Processing package changes...
(1/4) reinstalling wmctrl                                                                                          [####################################################################] 100%
(2/4) reinstalling python-pyqt5-sip                                                                                [####################################################################] 100%
(3/4) reinstalling python-pyqt5                                                                                    [####################################################################] 100%
(4/4) reinstalling python-pyqt5-webengine                                                                          [####################################################################] 100%
:: Running post-transaction hooks...
(1/1) Arming ConditionNeedsUpdate...
[EAF] Running pip install --user epc lxml @ /home/zw963/Dropbox/common/.emacs.d/plugins/emacs-application-framework/eaf
Requirement already satisfied: epc in /home/zw963/.local/lib/python3.9/site-packages (0.0.5)
Requirement already satisfied: lxml in /home/zw963/.local/lib/python3.9/site-packages (4.6.3)
Requirement already satisfied: sexpdata>=0.0.3 in /home/zw963/.local/lib/python3.9/site-packages (from epc) (0.0.3)
[EAF] Finished installing core dependencies
[EAF] ------------------------------------------
[EAF] ------------------------------------------
[EAF] Installing application dependencies
[EAF] Updating airshare to newest version...
[EAF] Running git pull @ app/airshare
Already up to date.
[EAF] Updating browser to newest version...
[EAF] Running git pull @ app/browser
Already up to date.
[EAF] Updating camera to newest version...
[EAF] Running git pull @ app/camera
Already up to date.
[EAF] Updating demo to newest version...
[EAF] Running git pull @ app/demo
Already up to date.
[EAF] Updating file-browser to newest version...
[EAF] Running git pull @ app/file-browser
Already up to date.
[EAF] Updating file-manager to newest version...
[EAF] Running git pull @ app/file-manager
Already up to date.
[EAF] Updating file-sender to newest version...
[EAF] Running git pull @ app/file-sender
Already up to date.
[EAF] Updating image-viewer to newest version...
[EAF] Running git pull @ app/image-viewer
Already up to date.
[EAF] Updating jupyter to newest version...
[EAF] Running git pull @ app/jupyter
Already up to date.
[EAF] Updating markdown-previewer to newest version...
[EAF] Running git pull @ app/markdown-previewer
Already up to date.
[EAF] Updating mermaid to newest version...
[EAF] Running git pull @ app/mermaid
Already up to date.
[EAF] Updating mindmap to newest version...
[EAF] Running git pull @ app/mindmap
Already up to date.
[EAF] Updating music-player to newest version...
[EAF] Running git pull @ app/music-player
Already up to date.
[EAF] Updating org-previewer to newest version...
[EAF] Running git pull @ app/org-previewer
Already up to date.
[EAF] Updating pdf-viewer to newest version...
[EAF] Running git pull @ app/pdf-viewer
Already up to date.
[EAF] Updating system-monitor to newest version...
[EAF] Running git pull @ app/system-monitor
Already up to date.
[EAF] Updating terminal to newest version...
[EAF] Running git pull @ app/terminal
Already up to date.
[EAF] Updating video-player to newest version...
[EAF] Running git pull @ app/video-player
Already up to date.
[EAF] Updating vue-demo to newest version...
[EAF] Running git pull @ app/vue-demo
Already up to date.
[EAF] Updating netease-cloud-music to newest version...
[EAF] Running git pull @ app/netease-cloud-music
Already up to date.

[EAF] Installing dependencies for installed applications   
[EAF] Finished installing applications and their dependencies <=  这里出错了,因为根本没有安装 app 的依赖。
[EAF] Please ensure the following are added to your init.el:
(require 'eaf-airshare)
(require 'eaf-browser)
(require 'eaf-camera)
(require 'eaf-demo)
(require 'eaf-file-browser)
(require 'eaf-file-manager)
(require 'eaf-file-sender)
(require 'eaf-image-viewer)
(require 'eaf-jupyter)
(require 'eaf-markdown-previewer)
(require 'eaf-mermaid)
(require 'eaf-mindmap)
(require 'eaf-music-player)
(require 'eaf-org-previewer)
(require 'eaf-pdf-viewer)
(require 'eaf-system-monitor)
(require 'eaf-terminal)
(require 'eaf-video-player)
(require 'eaf-vue-demo)
(require 'eaf-netease-cloud-music)
[EAF] Please run both 'git pull' and 'install-eaf.py' (M-x eaf-install-and-update) to update EAF, applications and their dependencies.
[EAF] Use the flag '--install-new-apps' to install previously uninstalled or new apps.
[EAF] ------------------------------------------
[EAF] install-eaf.py finished.

我稍后不得不手动安装这些依赖。

 sudo pacman -Sy --noconfirm python-qrcode aria2 python-qrcode filebrowser-bin fd python-qrcode python-qtconsole python-markdown taglib
:: Synchronizing package databases...
 core is up to date
 extra is up to date
 community is up to date
 multilib is up to date
 archlinuxcn is up to date
warning: filebrowser-bin-2.17.2-1 is up to date -- reinstalling
warning: python-markdown-3.3.4-1 is up to date -- reinstalling
warning: taglib-1.12-1 is up to date -- reinstalling
resolving dependencies...
looking for conflicting packages...
warning: dependency cycle detected:
warning: python-jupyter_client will be installed before its python-ipykernel dependency

Packages (31) c-ares-1.17.2-1  ipython-7.27.0-1  libimagequant-2.15.1-1  python-backcall-0.2.0-4  python-dateutil-2.8.2-1  python-debugpy-1.4.3-1  python-decorator-5.0.9-1
              python-ipykernel-6.0.3-2  python-jedi-0.18.0-2  python-jupyter_client-6.1.12-1  python-jupyter_core-4.7.1-1  python-matplotlib-inline-0.1.2-1  python-parso-1:0.8.2-1
              python-pexpect-4.8.0-3  python-pickleshare-0.7.5-6  python-pillow-8.3.2-1  python-prompt_toolkit-3.0.20-1  python-ptyprocess-0.7.0-1  python-pygments-2.10.0-1
              python-pyzmq-22.2.1-1  python-qtpy-1.9.0-5  python-tornado-6.1.0-3  python-traitlets-5.0.5-2  python-wcwidth-0.2.5-3  aria2-1.36.0-1  fd-8.2.1-1  filebrowser-bin-2.17.2-1
              python-markdown-3.3.4-1  python-qrcode-7.3-5  python-qtconsole-5.1.1-1  taglib-1.12-1

Total Download Size:    2.19 MiB
Total Installed Size:  86.09 MiB
Net Upgrade Size:      63.69 MiB

:: Proceed with installation? [Y/n] 
:: Retrieving packages...
 python-tornado-6.1.0-3-x86_64 is up to date
 python-prompt_toolkit-3.0.20-1-any                                                    545.0 KiB  3.13 MiB/s 00:00 [####################################################################] 100%
 python-pyzmq-22.2.1-1-x86_64                                                          420.1 KiB  3.42 MiB/s 00:00 [####################################################################] 100%
 python-dateutil-2.8.2-1-any                                                           288.7 KiB  3.03 MiB/s 00:00 [####################################################################] 100%
 python-traitlets-5.0.5-2-any                                                          209.2 KiB  2.65 MiB/s 00:00 [####################################################################] 100%
 python-ipykernel-6.0.3-2-any                                                          191.6 KiB  2.25 MiB/s 00:00 [####################################################################] 100%
 python-qtconsole-5.1.1-1-any                                                          174.2 KiB  1117 KiB/s 00:00 [####################################################################] 100%
 python-jupyter_client-6.1.12-1-any                                                    164.2 KiB  1766 KiB/s 00:00 [####################################################################] 100%
 python-qrcode-7.3-5-any                                                                69.8 KiB  1247 KiB/s 00:00 [####################################################################] 100%
 python-jupyter_core-4.7.1-1-any                                                        69.7 KiB   918 KiB/s 00:00 [####################################################################] 100%
 python-qtpy-1.9.0-5-any                                                                65.5 KiB   819 KiB/s 00:00 [####################################################################] 100%
 libimagequant-2.15.1-1-x86_64                                                          43.1 KiB   496 KiB/s 00:00 [####################################################################] 100%
 Total (12/12)                                                                           2.2 MiB  1163 KiB/s 00:02 [####################################################################] 100%
(31/31) checking keys in keyring                                                                                   [####################################################################] 100%
(31/31) checking package integrity                                                                                 [####################################################################] 100%
(31/31) loading package files                                                                                      [####################################################################] 100%
(31/31) checking for file conflicts                                                                                [####################################################################] 100%
(31/31) checking available disk space                                                                              [####################################################################] 100%
:: Processing package changes...
( 1/31) installing libimagequant                                                                                   [####################################################################] 100%
( 2/31) installing python-pillow                                                                                   [####################################################################] 100%
Optional dependencies for python-pillow
    libwebp: for webp images [installed]
    tk: for the ImageTK module
    python-olefile: OLE2 file support
    python-pyqt5: for the ImageQt module [installed]
( 3/31) installing python-qrcode                                                                                   [####################################################################] 100%
( 4/31) installing c-ares                                                                                          [####################################################################] 100%
( 5/31) installing aria2                                                                                           [####################################################################] 100%
( 6/31) reinstalling filebrowser-bin                                                                               [####################################################################] 100%

If you upgrade the filebrowser from 1.x
You must need to read the: https://docs.filebrowser.xyz/upgrade-from-1.x
And the systemd unit and config file also need to be changed by yourself.

More: https://github.com/filebrowser/filebrowser
      https://docs.filebrowser.xyz/

( 7/31) installing fd                                                                                              [####################################################################] 100%
( 8/31) installing python-decorator                                                                                [####################################################################] 100%
( 9/31) installing python-traitlets                                                                                [####################################################################] 100%
(10/31) installing python-tornado                                                                                  [####################################################################] 100%
Optional dependencies for python-tornado
    python-pycurl: for tornado.curl_httpclient
    python-twisted: for tornado.platform.twisted
(11/31) installing python-ptyprocess                                                                               [####################################################################] 100%
(12/31) installing python-pexpect                                                                                  [####################################################################] 100%
(13/31) installing python-pickleshare                                                                              [####################################################################] 100%
(14/31) installing python-pygments                                                                                 [####################################################################] 100%
(15/31) installing python-wcwidth                                                                                  [####################################################################] 100%
(16/31) installing python-prompt_toolkit                                                                           [####################################################################] 100%
(17/31) installing python-parso                                                                                    [####################################################################] 100%
(18/31) installing python-jedi                                                                                     [####################################################################] 100%
(19/31) installing python-backcall                                                                                 [####################################################################] 100%
(20/31) installing python-matplotlib-inline                                                                        [####################################################################] 100%
Optional dependencies for python-matplotlib-inline
    python-matplotlib
(21/31) installing ipython                                                                                         [####################################################################] 100%
(22/31) installing python-pyzmq                                                                                    [####################################################################] 100%
(23/31) installing python-jupyter_core                                                                             [####################################################################] 100%
(24/31) installing python-dateutil                                                                                 [####################################################################] 100%
(25/31) installing python-jupyter_client                                                                           [####################################################################] 100%
(26/31) installing python-debugpy                                                                                  [####################################################################] 100%
(27/31) installing python-ipykernel                                                                                [####################################################################] 100%
(28/31) installing python-qtpy                                                                                     [####################################################################] 100%
Optional dependencies for python-qtpy
    python-pyqt5: Qt5 Python bindings [installed]
    python-pyqtwebengine: Qt5-WebEngine python bindings [installed]
    python-pyside2: PySide Qt5 Python bindings
(29/31) installing python-qtconsole                                                                                [####################################################################] 100%
(30/31) reinstalling python-markdown                                                                               [####################################################################] 100%
(31/31) reinstalling taglib                                                                                        [####################################################################] 100%
:: Running post-transaction hooks...
(1/3) Reloading system manager configuration...
(2/3) Arming ConditionNeedsUpdate...
(3/3) Updating the desktop file MIME type cache...

所以,其实,我并不知道是不是完整的安装了所有依赖,现在的结果是,eaf-demo,eaf-camera 可用,eaf-browser, eaf-terminal 测试了一下还是无法使用。

zw963 commented 3 years ago

下面是 eaf 错误提示:

当运行 eaf-browser 的时候:

[EAF/browser] Opening http://www.baidu.com

Warning: Ignoring XDG_SESSION_TYPE=wayland on Gnome. Use QT_QPA_PLATFORM=wayland to run on Wayland anyway.
Traceback (most recent call last):
  File "/home/zw963/Dropbox/common/.emacs.d/plugins/emacs-application-framework/eaf/core/utils.py", line 60, in on_signal_received
    self._func(obj, *args, **kwargs)
  File "/home/zw963/Dropbox/common/.emacs.d/plugins/emacs-application-framework/eaf/eaf.py", line 170, in new_buffer
    self.create_buffer(buffer_id, url, module_path, arguments)
  File "/home/zw963/Dropbox/common/.emacs.d/plugins/emacs-application-framework/eaf/eaf.py", line 187, in create_buffer
    app_buffer = module.AppBuffer(buffer_id, url, arguments)
  File "/home/zw963/Dropbox/common/.emacs.d/plugins/emacs-application-framework/eaf/app/browser/buffer.py", line 79, in __init__
    self.buffer_widget.dark_mode_js = open(os.path.join(os.path.dirname(__file__),
FileNotFoundError: [Errno 2] No such file or directory: '/home/zw963/Dropbox/common/.emacs.d/plugins/emacs-application-framework/eaf/app/browser/node_modules/darkreader/darkreader.js'

Process *eaf* aborted (core dumped)

当运行 terminal 时.

Warning: Ignoring XDG_SESSION_TYPE=wayland on Gnome. Use QT_QPA_PLATFORM=wayland to run on Wayland anyway.
127.0.0.1 - - [11/Sep/2021 22:15:21] "GET /index.html HTTP/1.1" 200 -
Session is not restored, as /home/zw963/.emacs.d/eaf/session.json cannot be found.
127.0.0.1 - - [11/Sep/2021 22:15:21] code 404, message File not found
127.0.0.1 - - [11/Sep/2021 22:15:21] "GET /node_modules/xterm-addon-search/lib/xterm-addon-search.js HTTP/1.1" 404 -
127.0.0.1 - - [11/Sep/2021 22:15:21] code 404, message File not found
127.0.0.1 - - [11/Sep/2021 22:15:21] "GET /node_modules/xterm-addon-web-links/lib/xterm-addon-web-links.js HTTP/1.1" 404 -
127.0.0.1 - - [11/Sep/2021 22:15:21] "GET /dark_theme.js HTTP/1.1" 200 -
127.0.0.1 - - [11/Sep/2021 22:15:21] code 404, message File not found
127.0.0.1 - - [11/Sep/2021 22:15:21] "GET /node_modules/xterm/lib/xterm.js HTTP/1.1" 404 -
127.0.0.1 - - [11/Sep/2021 22:15:21] code 404, message File not found
127.0.0.1 - - [11/Sep/2021 22:15:21] "GET /node_modules/xterm-addon-attach/lib/xterm-addon-attach.js HTTP/1.1" 404 -
127.0.0.1 - - [11/Sep/2021 22:15:21] code 404, message File not found
127.0.0.1 - - [11/Sep/2021 22:15:21] "GET /node_modules/xterm/css/xterm.css HTTP/1.1" 404 -
127.0.0.1 - - [11/Sep/2021 22:15:21] code 404, message File not found
127.0.0.1 - - [11/Sep/2021 22:15:21] "GET /node_modules/xterm-addon-fit/lib/xterm-addon-fit.js HTTP/1.1" 404 -
127.0.0.1 - - [11/Sep/2021 22:15:21] code 404, message File not found
127.0.0.1 - - [11/Sep/2021 22:15:21] "GET /node_modules/xterm-addon-search/lib/xterm-addon-search.js HTTP/1.1" 404 -
127.0.0.1 - - [11/Sep/2021 22:15:21] code 404, message File not found
127.0.0.1 - - [11/Sep/2021 22:15:21] "GET /node_modules/xterm-addon-web-links/lib/xterm-addon-web-links.js HTTP/1.1" 404 -
127.0.0.1 - - [11/Sep/2021 22:15:21] code 404, message File not found
127.0.0.1 - - [11/Sep/2021 22:15:21] "GET /node_modules/xterm/css/xterm.css HTTP/1.1" 404 -
Uncaught ReferenceError: Terminal is not defined
WebSocket connection to 'ws://127.0.0.1:57153/' failed: Error in connection establishment: net::ERR_CONNECTION_REFUSED
Create session file /home/zw963/.emacs.d/eaf/session.json
Traceback (most recent call last):
  File "/home/zw963/Dropbox/common/.emacs.d/plugins/emacs-application-framework/eaf/core/utils.py", line 60, in on_signal_received
    self._func(obj, *args, **kwargs)
  File "/home/zw963/Dropbox/common/.emacs.d/plugins/emacs-application-framework/eaf/eaf.py", line 250, in update_views
    view = View(self.buffer_dict[buffer_id], view_info)
KeyError: '9ff7-0164-b8b5-be93-547a-7867-73b2'

Process *eaf* aborted (core dumped)
zw963 commented 3 years ago

很明显,因为我在安装下面这一步的时候意外出错了,结果它跳过了后面的所有安装 node 依赖的步骤。

[EAF] Installing dependencies for installed applications
[EAF] Installing system dependencies
[EAF] Running sudo pacman -Sy --noconfirm python-qrcode aria2 python-qrcode filebrowser-bin fd python-qrcode python-qtconsole python-markdown taglib @ /home/zw963/Dropbox/common/.emacs.d/plugins/emacs-application-framework/eaf
:: Synchronizing package databases...
 core.db failed to download
error: failed retrieving file 'core.db' from mirrors.bfsu.edu.cn : OpenSSL SSL_connect: SSL_ERROR_SYSCALL in connection to mirrors.bfsu.edu.cn:443 
error: failed to synchronize all databases (download library error)

我不得不手动删除整个 app 文件夹,来让那些丢失的步骤重新运行。

manateelazycat commented 3 years ago

用代理来修复你的网络问题吧,网络出错下载到一半,python没法探测到里下载到一半挂的问题。