3D打印 / Linux · 2022年4月12日

X86老平板、Linux系统、klipper、KlipperScreen安装记录

2022-4-14更新:接上打印USB后连接不上打印机,查看日志文件提示串口访问权限不够,使用命令提升权限。

https://blog.csdn.net/c417469898/article/details/117510172

ls -l /dev/ttyAM0  #查看用户组 

再使用命令把自己的用户加入到用户组后重启。

sudo usermod -aG dialout username

平板型号 酷比魔方 U100GT 2+32G 之前在平板上安装过debian11系统,也成功的安装好了klipperscreen正常显示,但无奈debian系统认不到rtl8723be的无线网卡,还是决定重新找一个能无线网卡正常使用的linux版本,bodhilinux ,这个linux系统是基于ubuntu 20.04的 安装好触摸正常,无线正常,稳定性也好,开机一晚上未死机,熄屏唤醒也正常,这次简单记录了一下安装过程中出现的错误及解决方法。

一、系统安装

https://www.bodhilinux.com/ 下载最新64位版本,将bootia32.efi复制到/efi/boot目录下才能启动安装界面,文件下载地址。安装过程略过。。

二、使用安装助手安装klipper\moonraker\fluidd或者。。。

cd ~

git clone https://github.com/th33xitus/kiauh.git

./kiauh/kiauh.sh

安装步骤略过。。klipper 和fluidd的安装教程很多。

三、安装klipperscreen

在安装klipperscreen的过程中会报很多错误。下面将我记录的错误提示记录一下。

pi@klipper:~/KlipperScreen/scripts$ ./KlipperScreen-install.sh
Update package data
[sudo] password for pi:
命中:1 http://security.ubuntu.com/ubuntu focal-security InRelease
命中:2 http://cn.archive.ubuntu.com/ubuntu focal InRelease
命中:3 http://cn.archive.ubuntu.com/ubuntu focal-updates InRelease
命中:4 http://packages.bodhilinux.com/bodhi focal InRelease
命中:5 http://cn.archive.ubuntu.com/ubuntu focal-backports InRelease
正在读取软件包列表... 完成
Checking for broken packages...
No broken packages
Installing KlipperScreen dependencies
正在读取软件包列表... 完成
正在分析软件包的依赖关系树
正在读取状态信息... 完成
E: 无法定位软件包 xserver-xorg-video-fbturbo
Creating virtual environment
Requirement already satisfied: numpy==1.21.4 in /home/pi/.KlipperScreen-env/lib/python3.8/site-packages (1.21.4)
WARNING: You are using pip version 21.3.1; however, version 22.0.4 is available.
You should consider upgrading via the '/home/pi/.KlipperScreen-env/bin/python -m pip install --upgrade pip' command.
Requirement already satisfied: jinja2==3.1.1 in /home/pi/.KlipperScreen-env/lib/python3.8/site-packages (3.1.1)
Requirement already satisfied: MarkupSafe>=2.0 in /home/pi/.KlipperScreen-env/lib/python3.8/site-packages (from jinja2==3.1.1) (2.1.1)
WARNING: You are using pip version 21.3.1; however, version 22.0.4 is available.
You should consider upgrading via the '/home/pi/.KlipperScreen-env/bin/python -m pip install --upgrade pip' command.
Requirement already satisfied: matplotlib==3.5.0 in /home/pi/.KlipperScreen-env/lib/python3.8/site-packages (3.5.0)
Requirement already satisfied: cycler>=0.10 in /home/pi/.KlipperScreen-env/lib/python3.8/site-packages (from matplotlib==3.5.0) (0.11.0)
Requirement already satisfied: packaging>=20.0 in /home/pi/.KlipperScreen-env/lib/python3.8/site-packages (from matplotlib==3.5.0) (21.3)
Requirement already satisfied: pyparsing>=2.2.1 in /home/pi/.KlipperScreen-env/lib/python3.8/site-packages (from matplotlib==3.5.0) (3.0.7)
Requirement already satisfied: fonttools>=4.22.0 in /home/pi/.KlipperScreen-env/lib/python3.8/site-packages (from matplotlib==3.5.0) (4.32.0)
Requirement already satisfied: setuptools-scm>=4 in /home/pi/.KlipperScreen-env/lib/python3.8/site-packages (from matplotlib==3.5.0) (6.4.2)
Requirement already satisfied: numpy>=1.17 in /home/pi/.KlipperScreen-env/lib/python3.8/site-packages (from matplotlib==3.5.0) (1.21.4)
Requirement already satisfied: pillow>=6.2.0 in /home/pi/.KlipperScreen-env/lib/python3.8/site-packages (from matplotlib==3.5.0) (9.1.0)
Requirement already satisfied: python-dateutil>=2.7 in /home/pi/.KlipperScreen-env/lib/python3.8/site-packages (from matplotlib==3.5.0) (2.8.2)
Requirement already satisfied: kiwisolver>=1.0.1 in /home/pi/.KlipperScreen-env/lib/python3.8/site-packages (from matplotlib==3.5.0) (1.4.2)
Requirement already satisfied: six>=1.5 in /home/pi/.KlipperScreen-env/lib/python3.8/site-packages (from python-dateutil>=2.7->matplotlib==3.5.0) (1.16.0)
Requirement already satisfied: setuptools in /home/pi/.KlipperScreen-env/lib/python3.8/site-packages (from setuptools-scm>=4->matplotlib==3.5.0) (44.0.0)
Requirement already satisfied: tomli>=1.0.0 in /home/pi/.KlipperScreen-env/lib/python3.8/site-packages (from setuptools-scm>=4->matplotlib==3.5.0) (2.0.1)
WARNING: You are using pip version 21.3.1; however, version 22.0.4 is available.
You should consider upgrading via the '/home/pi/.KlipperScreen-env/bin/python -m pip install --upgrade pip' command.
Requirement already satisfied: netifaces==0.11.0 in /home/pi/.KlipperScreen-env/lib/python3.8/site-packages (0.11.0)
WARNING: You are using pip version 21.3.1; however, version 22.0.4 is available.
You should consider upgrading via the '/home/pi/.KlipperScreen-env/bin/python -m pip install --upgrade pip' command.
Requirement already satisfied: requests==2.27.1 in /home/pi/.KlipperScreen-env/lib/python3.8/site-packages (2.27.1)
Requirement already satisfied: urllib3<1.27,>=1.21.1 in /home/pi/.KlipperScreen-env/lib/python3.8/site-packages (from requests==2.27.1) (1.26.9)
Requirement already satisfied: idna<4,>=2.5 in /home/pi/.KlipperScreen-env/lib/python3.8/site-packages (from requests==2.27.1) (3.3)
Requirement already satisfied: certifi>=2017.4.17 in /home/pi/.KlipperScreen-env/lib/python3.8/site-packages (from requests==2.27.1) (2021.10.8)
Requirement already satisfied: charset-normalizer~=2.0.0 in /home/pi/.KlipperScreen-env/lib/python3.8/site-packages (from requests==2.27.1) (2.0.12)
WARNING: You are using pip version 21.3.1; however, version 22.0.4 is available.
You should consider upgrading via the '/home/pi/.KlipperScreen-env/bin/python -m pip install --upgrade pip' command.
Requirement already satisfied: websocket-client==1.3.2 in /home/pi/.KlipperScreen-env/lib/python3.8/site-packages (1.3.2)
WARNING: You are using pip version 21.3.1; however, version 22.0.4 is available.
You should consider upgrading via the '/home/pi/.KlipperScreen-env/bin/python -m pip install --upgrade pip' command.
Collecting pycairo==1.21.0
  Using cached pycairo-1.21.0.tar.gz (340 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Building wheels for collected packages: pycairo
  Building wheel for pycairo (pyproject.toml) ... error
  ERROR: Command errored out with exit status 1:
   command: /home/pi/.KlipperScreen-env/bin/python /home/pi/.KlipperScreen-env/lib/python3.8/site-packages/pip/_vendor/pep517/in_process/_in_process.py build_wheel /tmp/tmpt4nd_9nw
       cwd: /tmp/pip-install-ds4_9ohl/pycairo_16d66c4cacb1433cbafd910dec931d2c
  Complete output (12 lines):
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build/lib.linux-x86_64-cpython-38
  creating build/lib.linux-x86_64-cpython-38/cairo
  copying cairo/__init__.py -> build/lib.linux-x86_64-cpython-38/cairo
  copying cairo/__init__.pyi -> build/lib.linux-x86_64-cpython-38/cairo
  copying cairo/py.typed -> build/lib.linux-x86_64-cpython-38/cairo
  running build_ext
  'pkg-config' not found.
  Command ['pkg-config', '--print-errors', '--exists', 'cairo >= 1.15.10']
  ----------------------------------------
  ERROR: Failed building wheel for pycairo
Failed to build pycairo
ERROR: Could not build wheels for pycairo, which is required to install pyproject.toml-based projects
WARNING: You are using pip version 21.3.1; however, version 22.0.4 is available.
You should consider upgrading via the '/home/pi/.KlipperScreen-env/bin/python -m pip install --upgrade pip' command.
Error: pip install exited with status code 0
Unable to install dependencies, aborting install.

好像是cairo这个版本不对

sudo apt-get install libcairo2-dev

我使用下面这段代码后又出现如下提示

pi@klipper:~/KlipperScreen/scripts$ ./KlipperScreen-install.sh
Update package data
命中:1 http://packages.bodhilinux.com/bodhi focal InRelease
命中:2 http://cn.archive.ubuntu.com/ubuntu focal InRelease
命中:3 http://cn.archive.ubuntu.com/ubuntu focal-updates InRelease
命中:4 http://security.ubuntu.com/ubuntu focal-security InRelease
命中:5 http://cn.archive.ubuntu.com/ubuntu focal-backports InRelease
正在读取软件包列表... 完成
Checking for broken packages...
No broken packages
Installing KlipperScreen dependencies
正在读取软件包列表... 完成
正在分析软件包的依赖关系树
正在读取状态信息... 完成
E: 无法定位软件包 xserver-xorg-video-fbturbo
Creating virtual environment
Requirement already satisfied: numpy==1.21.4 in /home/pi/.KlipperScreen-env/lib/python3.8/site-packages (1.21.4)
WARNING: You are using pip version 21.3.1; however, version 22.0.4 is available.
You should consider upgrading via the '/home/pi/.KlipperScreen-env/bin/python -m pip install --upgrade pip' command.
Requirement already satisfied: jinja2==3.1.1 in /home/pi/.KlipperScreen-env/lib/python3.8/site-packages (3.1.1)
Requirement already satisfied: MarkupSafe>=2.0 in /home/pi/.KlipperScreen-env/lib/python3.8/site-packages (from jinja2==3.1.1) (2.1.1)
WARNING: You are using pip version 21.3.1; however, version 22.0.4 is available.
You should consider upgrading via the '/home/pi/.KlipperScreen-env/bin/python -m pip install --upgrade pip' command.
Requirement already satisfied: matplotlib==3.5.0 in /home/pi/.KlipperScreen-env/lib/python3.8/site-packages (3.5.0)
Requirement already satisfied: setuptools-scm>=4 in /home/pi/.KlipperScreen-env/lib/python3.8/site-packages (from matplotlib==3.5.0) (6.4.2)
Requirement already satisfied: pillow>=6.2.0 in /home/pi/.KlipperScreen-env/lib/python3.8/site-packages (from matplotlib==3.5.0) (9.1.0)
Requirement already satisfied: kiwisolver>=1.0.1 in /home/pi/.KlipperScreen-env/lib/python3.8/site-packages (from matplotlib==3.5.0) (1.4.2)
Requirement already satisfied: python-dateutil>=2.7 in /home/pi/.KlipperScreen-env/lib/python3.8/site-packages (from matplotlib==3.5.0) (2.8.2)
Requirement already satisfied: cycler>=0.10 in /home/pi/.KlipperScreen-env/lib/python3.8/site-packages (from matplotlib==3.5.0) (0.11.0)
Requirement already satisfied: numpy>=1.17 in /home/pi/.KlipperScreen-env/lib/python3.8/site-packages (from matplotlib==3.5.0) (1.21.4)
Requirement already satisfied: fonttools>=4.22.0 in /home/pi/.KlipperScreen-env/lib/python3.8/site-packages (from matplotlib==3.5.0) (4.32.0)
Requirement already satisfied: pyparsing>=2.2.1 in /home/pi/.KlipperScreen-env/lib/python3.8/site-packages (from matplotlib==3.5.0) (3.0.7)
Requirement already satisfied: packaging>=20.0 in /home/pi/.KlipperScreen-env/lib/python3.8/site-packages (from matplotlib==3.5.0) (21.3)
Requirement already satisfied: six>=1.5 in /home/pi/.KlipperScreen-env/lib/python3.8/site-packages (from python-dateutil>=2.7->matplotlib==3.5.0) (1.16.0)
Requirement already satisfied: setuptools in /home/pi/.KlipperScreen-env/lib/python3.8/site-packages (from setuptools-scm>=4->matplotlib==3.5.0) (44.0.0)
Requirement already satisfied: tomli>=1.0.0 in /home/pi/.KlipperScreen-env/lib/python3.8/site-packages (from setuptools-scm>=4->matplotlib==3.5.0) (2.0.1)
WARNING: You are using pip version 21.3.1; however, version 22.0.4 is available.
You should consider upgrading via the '/home/pi/.KlipperScreen-env/bin/python -m pip install --upgrade pip' command.
Requirement already satisfied: netifaces==0.11.0 in /home/pi/.KlipperScreen-env/lib/python3.8/site-packages (0.11.0)
WARNING: You are using pip version 21.3.1; however, version 22.0.4 is available.
You should consider upgrading via the '/home/pi/.KlipperScreen-env/bin/python -m pip install --upgrade pip' command.
Requirement already satisfied: requests==2.27.1 in /home/pi/.KlipperScreen-env/lib/python3.8/site-packages (2.27.1)
Requirement already satisfied: urllib3<1.27,>=1.21.1 in /home/pi/.KlipperScreen-env/lib/python3.8/site-packages (from requests==2.27.1) (1.26.9)
Requirement already satisfied: idna<4,>=2.5 in /home/pi/.KlipperScreen-env/lib/python3.8/site-packages (from requests==2.27.1) (3.3)
Requirement already satisfied: charset-normalizer~=2.0.0 in /home/pi/.KlipperScreen-env/lib/python3.8/site-packages (from requests==2.27.1) (2.0.12)
Requirement already satisfied: certifi>=2017.4.17 in /home/pi/.KlipperScreen-env/lib/python3.8/site-packages (from requests==2.27.1) (2021.10.8)
WARNING: You are using pip version 21.3.1; however, version 22.0.4 is available.
You should consider upgrading via the '/home/pi/.KlipperScreen-env/bin/python -m pip install --upgrade pip' command.
Requirement already satisfied: websocket-client==1.3.2 in /home/pi/.KlipperScreen-env/lib/python3.8/site-packages (1.3.2)
WARNING: You are using pip version 21.3.1; however, version 22.0.4 is available.
You should consider upgrading via the '/home/pi/.KlipperScreen-env/bin/python -m pip install --upgrade pip' command.
Collecting pycairo==1.21.0
  Using cached pycairo-1.21.0.tar.gz (340 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Building wheels for collected packages: pycairo
  Building wheel for pycairo (pyproject.toml) ... done
  Created wheel for pycairo: filename=pycairo-1.21.0-cp38-cp38-linux_x86_64.whl size=324225 sha256=49e6cc7b7294496dd8e64060b650296cacad7caca18930cf4a695c2f677d5fd3
  Stored in directory: /home/pi/.cache/pip/wheels/29/70/ec/35acc9bec1042aaa2f67009ae5cf615be86d335593bd5565e2
Successfully built pycairo
Installing collected packages: pycairo
Successfully installed pycairo-1.21.0
WARNING: You are using pip version 21.3.1; however, version 22.0.4 is available.
You should consider upgrading via the '/home/pi/.KlipperScreen-env/bin/python -m pip install --upgrade pip' command.
Collecting PyGObject==3.42.0
  Downloading PyGObject-3.42.0.tar.gz (716 kB)
     |████████████████████████████████| 716 kB 190 kB/s
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Requirement already satisfied: pycairo>=1.16.0 in /home/pi/.KlipperScreen-env/lib/python3.8/site-packages (from PyGObject==3.42.0) (1.21.0)
Building wheels for collected packages: PyGObject
  Building wheel for PyGObject (pyproject.toml) ... error
  ERROR: Command errored out with exit status 1:
   command: /home/pi/.KlipperScreen-env/bin/python /home/pi/.KlipperScreen-env/lib/python3.8/site-packages/pip/_vendor/pep517/in_process/_in_process.py build_wheel /tmp/tmpvxmw2wgh
       cwd: /tmp/pip-install-mzs61b5m/pygobject_a2b18126b10a4d58b05f1f3c7e542f3b
  Complete output (44 lines):
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build/lib.linux-x86_64-cpython-38
  creating build/lib.linux-x86_64-cpython-38/pygtkcompat
  copying pygtkcompat/pygtkcompat.py -> build/lib.linux-x86_64-cpython-38/pygtkcompat
  copying pygtkcompat/__init__.py -> build/lib.linux-x86_64-cpython-38/pygtkcompat
  copying pygtkcompat/generictreemodel.py -> build/lib.linux-x86_64-cpython-38/pygtkcompat
  creating build/lib.linux-x86_64-cpython-38/gi
  copying gi/_error.py -> build/lib.linux-x86_64-cpython-38/gi
  copying gi/pygtkcompat.py -> build/lib.linux-x86_64-cpython-38/gi
  copying gi/__init__.py -> build/lib.linux-x86_64-cpython-38/gi
  copying gi/_ossighelper.py -> build/lib.linux-x86_64-cpython-38/gi
  copying gi/_propertyhelper.py -> build/lib.linux-x86_64-cpython-38/gi
  copying gi/_option.py -> build/lib.linux-x86_64-cpython-38/gi
  copying gi/types.py -> build/lib.linux-x86_64-cpython-38/gi
  copying gi/importer.py -> build/lib.linux-x86_64-cpython-38/gi
  copying gi/_signalhelper.py -> build/lib.linux-x86_64-cpython-38/gi
  copying gi/_gtktemplate.py -> build/lib.linux-x86_64-cpython-38/gi
  copying gi/module.py -> build/lib.linux-x86_64-cpython-38/gi
  copying gi/_constants.py -> build/lib.linux-x86_64-cpython-38/gi
  copying gi/docstring.py -> build/lib.linux-x86_64-cpython-38/gi
  creating build/lib.linux-x86_64-cpython-38/gi/repository
  copying gi/repository/__init__.py -> build/lib.linux-x86_64-cpython-38/gi/repository
  creating build/lib.linux-x86_64-cpython-38/gi/overrides
  copying gi/overrides/GIMarshallingTests.py -> build/lib.linux-x86_64-cpython-38/gi/overrides
  copying gi/overrides/GdkPixbuf.py -> build/lib.linux-x86_64-cpython-38/gi/overrides
  copying gi/overrides/GLib.py -> build/lib.linux-x86_64-cpython-38/gi/overrides
  copying gi/overrides/GObject.py -> build/lib.linux-x86_64-cpython-38/gi/overrides
  copying gi/overrides/__init__.py -> build/lib.linux-x86_64-cpython-38/gi/overrides
  copying gi/overrides/Gtk.py -> build/lib.linux-x86_64-cpython-38/gi/overrides
  copying gi/overrides/Pango.py -> build/lib.linux-x86_64-cpython-38/gi/overrides
  copying gi/overrides/Gio.py -> build/lib.linux-x86_64-cpython-38/gi/overrides
  copying gi/overrides/keysyms.py -> build/lib.linux-x86_64-cpython-38/gi/overrides
  copying gi/overrides/Gdk.py -> build/lib.linux-x86_64-cpython-38/gi/overrides
  running build_ext
  Package gobject-introspection-1.0 was not found in the pkg-config search path.
  Perhaps you should add the directory containing `gobject-introspection-1.0.pc'
  to the PKG_CONFIG_PATH environment variable
  No package 'gobject-introspection-1.0' found
  Command '('pkg-config', '--print-errors', '--exists', 'gobject-introspection-1.0 >= 1.56.0')' returned non-zero exit status 1.

  Try installing it with: 'sudo apt install libgirepository1.0-dev'
  ----------------------------------------
  ERROR: Failed building wheel for PyGObject
Failed to build PyGObject
ERROR: Could not build wheels for PyGObject, which is required to install pyproject.toml-based projects
WARNING: You are using pip version 21.3.1; however, version 22.0.4 is available.
You should consider upgrading via the '/home/pi/.KlipperScreen-env/bin/python -m pip install --upgrade pip' command.
Error: pip install exited with status code 0
Unable to install dependencies, aborting install.

执行安装命令

sudo apt install libgirepository1.0-dev

又出现如下提示

pi@klipper:~/KlipperScreen/scripts$ ./KlipperScreen-install.sh
Update package data
命中:1 http://packages.bodhilinux.com/bodhi focal InRelease
命中:2 http://cn.archive.ubuntu.com/ubuntu focal InRelease
获取:3 http://security.ubuntu.com/ubuntu focal-security InRelease [114 kB]
获取:4 http://cn.archive.ubuntu.com/ubuntu focal-updates InRelease [114 kB]
获取:5 http://security.ubuntu.com/ubuntu focal-security/main amd64 c-n-f Metadata [9,900 B]
获取:6 http://cn.archive.ubuntu.com/ubuntu focal-backports InRelease [108 kB]
获取:7 http://cn.archive.ubuntu.com/ubuntu focal-updates/main amd64 Packages [1,712 kB]
获取:8 http://cn.archive.ubuntu.com/ubuntu focal-updates/main Translation-en [320 kB]
已下载 2,378 kB,耗时 9秒 (260 kB/s)
正在读取软件包列表... 完成
Checking for broken packages...
No broken packages
Installing KlipperScreen dependencies
正在读取软件包列表... 完成
正在分析软件包的依赖关系树
正在读取状态信息... 完成
E: 无法定位软件包 xserver-xorg-video-fbturbo
Creating virtual environment
Requirement already satisfied: numpy==1.21.4 in /home/pi/.KlipperScreen-env/lib/python3.8/site-packages (1.21.4)
WARNING: You are using pip version 21.3.1; however, version 22.0.4 is available.
You should consider upgrading via the '/home/pi/.KlipperScreen-env/bin/python -m pip install --upgrade pip' command.
Requirement already satisfied: jinja2==3.1.1 in /home/pi/.KlipperScreen-env/lib/python3.8/site-packages (3.1.1)
Requirement already satisfied: MarkupSafe>=2.0 in /home/pi/.KlipperScreen-env/lib/python3.8/site-packages (from jinja2==3.1.1) (2.1.1)
WARNING: You are using pip version 21.3.1; however, version 22.0.4 is available.
You should consider upgrading via the '/home/pi/.KlipperScreen-env/bin/python -m pip install --upgrade pip' command.
Requirement already satisfied: matplotlib==3.5.0 in /home/pi/.KlipperScreen-env/lib/python3.8/site-packages (3.5.0)
Requirement already satisfied: cycler>=0.10 in /home/pi/.KlipperScreen-env/lib/python3.8/site-packages (from matplotlib==3.5.0) (0.11.0)
Requirement already satisfied: numpy>=1.17 in /home/pi/.KlipperScreen-env/lib/python3.8/site-packages (from matplotlib==3.5.0) (1.21.4)
Requirement already satisfied: pyparsing>=2.2.1 in /home/pi/.KlipperScreen-env/lib/python3.8/site-packages (from matplotlib==3.5.0) (3.0.7)
Requirement already satisfied: packaging>=20.0 in /home/pi/.KlipperScreen-env/lib/python3.8/site-packages (from matplotlib==3.5.0) (21.3)
Requirement already satisfied: setuptools-scm>=4 in /home/pi/.KlipperScreen-env/lib/python3.8/site-packages (from matplotlib==3.5.0) (6.4.2)
Requirement already satisfied: fonttools>=4.22.0 in /home/pi/.KlipperScreen-env/lib/python3.8/site-packages (from matplotlib==3.5.0) (4.32.0)
Requirement already satisfied: pillow>=6.2.0 in /home/pi/.KlipperScreen-env/lib/python3.8/site-packages (from matplotlib==3.5.0) (9.1.0)
Requirement already satisfied: kiwisolver>=1.0.1 in /home/pi/.KlipperScreen-env/lib/python3.8/site-packages (from matplotlib==3.5.0) (1.4.2)
Requirement already satisfied: python-dateutil>=2.7 in /home/pi/.KlipperScreen-env/lib/python3.8/site-packages (from matplotlib==3.5.0) (2.8.2)
Requirement already satisfied: six>=1.5 in /home/pi/.KlipperScreen-env/lib/python3.8/site-packages (from python-dateutil>=2.7->matplotlib==3.5.0) (1.16.0)
Requirement already satisfied: setuptools in /home/pi/.KlipperScreen-env/lib/python3.8/site-packages (from setuptools-scm>=4->matplotlib==3.5.0) (44.0.0)
Requirement already satisfied: tomli>=1.0.0 in /home/pi/.KlipperScreen-env/lib/python3.8/site-packages (from setuptools-scm>=4->matplotlib==3.5.0) (2.0.1)
WARNING: You are using pip version 21.3.1; however, version 22.0.4 is available.
You should consider upgrading via the '/home/pi/.KlipperScreen-env/bin/python -m pip install --upgrade pip' command.
Requirement already satisfied: netifaces==0.11.0 in /home/pi/.KlipperScreen-env/lib/python3.8/site-packages (0.11.0)
WARNING: You are using pip version 21.3.1; however, version 22.0.4 is available.
You should consider upgrading via the '/home/pi/.KlipperScreen-env/bin/python -m pip install --upgrade pip' command.
Requirement already satisfied: requests==2.27.1 in /home/pi/.KlipperScreen-env/lib/python3.8/site-packages (2.27.1)
Requirement already satisfied: certifi>=2017.4.17 in /home/pi/.KlipperScreen-env/lib/python3.8/site-packages (from requests==2.27.1) (2021.10.8)
Requirement already satisfied: urllib3<1.27,>=1.21.1 in /home/pi/.KlipperScreen-env/lib/python3.8/site-packages (from requests==2.27.1) (1.26.9)
Requirement already satisfied: idna<4,>=2.5 in /home/pi/.KlipperScreen-env/lib/python3.8/site-packages (from requests==2.27.1) (3.3)
Requirement already satisfied: charset-normalizer~=2.0.0 in /home/pi/.KlipperScreen-env/lib/python3.8/site-packages (from requests==2.27.1) (2.0.12)
WARNING: You are using pip version 21.3.1; however, version 22.0.4 is available.
You should consider upgrading via the '/home/pi/.KlipperScreen-env/bin/python -m pip install --upgrade pip' command.
Requirement already satisfied: websocket-client==1.3.2 in /home/pi/.KlipperScreen-env/lib/python3.8/site-packages (1.3.2)
WARNING: You are using pip version 21.3.1; however, version 22.0.4 is available.
You should consider upgrading via the '/home/pi/.KlipperScreen-env/bin/python -m pip install --upgrade pip' command.
Requirement already satisfied: pycairo==1.21.0 in /home/pi/.KlipperScreen-env/lib/python3.8/site-packages (1.21.0)
WARNING: You are using pip version 21.3.1; however, version 22.0.4 is available.
You should consider upgrading via the '/home/pi/.KlipperScreen-env/bin/python -m pip install --upgrade pip' command.
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:1131)'))': /simple/pygobject/
Collecting PyGObject==3.42.0
  Using cached PyGObject-3.42.0.tar.gz (716 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Requirement already satisfied: pycairo>=1.16.0 in /home/pi/.KlipperScreen-env/lib/python3.8/site-packages (from PyGObject==3.42.0) (1.21.0)
Building wheels for collected packages: PyGObject
  Building wheel for PyGObject (pyproject.toml) ... done
  Created wheel for PyGObject: filename=PyGObject-3.42.0-cp38-cp38-linux_x86_64.whl size=868954 sha256=00631c59b5084fdcb3ae6296c978682a0cfd91ae0f1e8e982423bdbf3aab0a2a
  Stored in directory: /home/pi/.cache/pip/wheels/d7/c9/c1/b1a55bb0d533707eb1f730c8d82f9ef255c167bafc7a00824a
Successfully built PyGObject
Installing collected packages: PyGObject
Successfully installed PyGObject-3.42.0
WARNING: You are using pip version 21.3.1; however, version 22.0.4 is available.
You should consider upgrading via the '/home/pi/.KlipperScreen-env/bin/python -m pip install --upgrade pip' command.
Virtual enviroment created
Installing KlipperScreen unit file
Created symlink /etc/systemd/system/multi-user.target.wants/KlipperScreen.service → /etc/systemd/system/KlipperScreen.service.
Adding X11 Xwrapper
allowed_users=anybody
KlipperScreen was installed
Starting service...

未报错,感觉已经安装好了。。但是还是没有显示出klipperscreen的界面,查看了xorg日志/home/pi/.local/share/xorg/Xorg.0.log

[ 63967.551] 
X.Org X Server 1.20.13
X Protocol Version 11, Revision 0
[ 63967.551] Build Operating System: linux Ubuntu
[ 63967.551] Current Operating System: Linux klipper 5.4.0-72-generic #80-Ubuntu SMP Mon Apr 12 17:35:00 UTC 2021 x86_64
[ 63967.551] Kernel command line: BOOT_IMAGE=/boot/vmlinuz-5.4.0-72-generic root=UUID=f9648e35-9b87-43ce-a3d8-c8c22da47ae4 ro quiet splash
[ 63967.551] Build Date: 14 December 2021  02:14:13PM
[ 63967.551] xorg-server 2:1.20.13-1ubuntu1~20.04.2 (For technical support please see http://www.ubuntu.com/support) 
[ 63967.551] Current version of pixman: 0.38.4
[ 63967.551] 	Before reporting problems, check http://wiki.x.org
	to make sure that you have the latest version.
[ 63967.551] Markers: (--) probed, (**) from config file, (==) default setting,
	(++) from command line, (!!) notice, (II) informational,
	(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
[ 63967.552] (==) Log file: "/home/pi/.local/share/xorg/Xorg.0.log", Time: Tue Apr 12 10:56:56 2022
[ 63967.552] (==) Using system config directory "/usr/share/X11/xorg.conf.d"
[ 63967.553] (==) No Layout section.  Using the first Screen section.
[ 63967.553] (==) No screen section available. Using defaults.
[ 63967.553] (**) |-->Screen "Default Screen Section" (0)
[ 63967.553] (**) |   |-->Monitor "<default monitor>"
[ 63967.554] (==) No monitor specified for screen "Default Screen Section".
	Using a default monitor configuration.
[ 63967.554] (==) Automatically adding devices
[ 63967.554] (==) Automatically enabling devices
[ 63967.554] (==) Automatically adding GPU devices
[ 63967.554] (==) Automatically binding GPU devices
[ 63967.554] (==) Max clients allowed: 256, resource mask: 0x1fffff
[ 63967.554] (WW) The directory "/usr/share/fonts/X11/cyrillic" does not exist.
[ 63967.554] 	Entry deleted from font path.
[ 63967.554] (WW) The directory "/usr/share/fonts/X11/100dpi/" does not exist.
[ 63967.554] 	Entry deleted from font path.
[ 63967.554] (WW) The directory "/usr/share/fonts/X11/75dpi/" does not exist.
[ 63967.554] 	Entry deleted from font path.
[ 63967.554] (WW) The directory "/usr/share/fonts/X11/100dpi" does not exist.
[ 63967.554] 	Entry deleted from font path.
[ 63967.555] (WW) The directory "/usr/share/fonts/X11/75dpi" does not exist.
[ 63967.555] 	Entry deleted from font path.
[ 63967.555] (==) FontPath set to:
	/usr/share/fonts/X11/misc,
	/usr/share/fonts/X11/Type1,
	built-ins
[ 63967.555] (==) ModulePath set to "/usr/lib/xorg/modules"
[ 63967.555] (II) The server relies on udev to provide the list of input devices.
	If no devices become available, reconfigure udev or disable AutoAddDevices.
[ 63967.555] (II) Loader magic: 0x5559ce4e4020
[ 63967.555] (II) Module ABI versions:
[ 63967.555] 	X.Org ANSI C Emulation: 0.4
[ 63967.555] 	X.Org Video Driver: 24.1
[ 63967.555] 	X.Org XInput driver : 24.1
[ 63967.555] 	X.Org Server Extension : 10.0
[ 63967.557] (--) using VT number 2

[ 63967.557] (II) systemd-logind: logind integration requires -keeptty and -keeptty was not provided, disabling logind integration
[ 63967.559] (II) xfree86: Adding drm device (/dev/dri/card0)
[ 63967.577] (--) PCI:*(0@0:2:0) 8086:0f31:8086:0f31 rev 11, Mem @ 0xa0000000/4194304, 0x80000000/536870912, I/O @ 0x00001000/8, BIOS @ 0x????????/131072
[ 63967.577] (II) LoadModule: "glx"
[ 63967.578] (II) Loading /usr/lib/xorg/modules/extensions/libglx.so
[ 63967.580] (II) Module glx: vendor="X.Org Foundation"
[ 63967.580] 	compiled for 1.20.13, module version = 1.0.0
[ 63967.580] 	ABI class: X.Org Server Extension, version 10.0
[ 63967.580] (==) Matched modesetting as autoconfigured driver 0
[ 63967.581] (==) Matched fbdev as autoconfigured driver 1
[ 63967.581] (==) Matched vesa as autoconfigured driver 2
[ 63967.581] (==) Assigned the driver to the xf86ConfigLayout
[ 63967.581] (II) LoadModule: "modesetting"
[ 63967.581] (II) Loading /usr/lib/xorg/modules/drivers/modesetting_drv.so
[ 63967.581] (II) Module modesetting: vendor="X.Org Foundation"
[ 63967.581] 	compiled for 1.20.13, module version = 1.20.13
[ 63967.581] 	Module class: X.Org Video Driver
[ 63967.581] 	ABI class: X.Org Video Driver, version 24.1
[ 63967.581] (II) LoadModule: "fbdev"
[ 63967.582] (II) Loading /usr/lib/xorg/modules/drivers/fbdev_drv.so
[ 63967.582] (II) Module fbdev: vendor="X.Org Foundation"
[ 63967.582] 	compiled for 1.20.1, module version = 0.5.0
[ 63967.582] 	Module class: X.Org Video Driver
[ 63967.582] 	ABI class: X.Org Video Driver, version 24.0
[ 63967.582] (II) LoadModule: "vesa"
[ 63967.582] (II) Loading /usr/lib/xorg/modules/drivers/vesa_drv.so
[ 63967.582] (II) Module vesa: vendor="X.Org Foundation"
[ 63967.582] 	compiled for 1.20.4, module version = 2.4.0
[ 63967.582] 	Module class: X.Org Video Driver
[ 63967.582] 	ABI class: X.Org Video Driver, version 24.0
[ 63967.582] (II) modesetting: Driver for Modesetting Kernel Drivers: kms
[ 63967.583] (II) FBDEV: driver for framebuffer: fbdev
[ 63967.583] (II) VESA: driver for VESA chipsets: vesa
[ 63967.583] (EE) 
Fatal server error:
[ 63967.583] (EE) xf86OpenConsole: Cannot open virtual console 2 (Permission denied)
[ 63967.583] (EE) 
[ 63967.583] (EE) 
Please consult the The X.Org Foundation support 
	 at http://wiki.x.org
 for help. 
[ 63967.583] (EE) Please also check the log file at "/home/pi/.local/share/xorg/Xorg.0.log" for additional information.
[ 63967.583] (EE) 
[ 63967.583] (WW) xf86CloseConsole: KDSETMODE failed: Bad file descriptor
[ 63967.583] (WW) xf86CloseConsole: VT_GETMODE failed: Bad file descriptor
[ 63967.583] (EE) Server terminated with error (1). Closing log file.

搜索标红错误 在这里找到 一个方法:https://blog.csdn.net/zx156955/article/details/119143192

sudo vim /etc/X11/Xwrapper.config
needs_root_rights = yes

编辑上面的文件 加上这一句

sudo chown pi /dev/tty2  #这句也执行过,不知道有没有用pi是我设置的用户名

还是显示的系统原有的桌面

卸载原有桌面

查看/etc/init.d下有lightdm

sudo apt-get remove lightdm

卸载了桌面 画面就有显示了,手动显示代码:

DISPLAY=localhost:0 /home/pi/.KlipperScreen-env/bin/python /home/pi/KlipperScreen/screen.py -c /home/pi/klipper_config/KlipperScreen.conf

还有一些命令忘记了是不是运行过,也记录一下。

sudo apt-get install libcairo2-dev
sudo apt install libc6
sudo apt install libffi8
sudo apt install libgirepository1.0-dev
sudo apt install xinit
sudo apt install xinit xorg
sudo apt remove phosh
sudo apt install xserver-xorg-input-libinput

安装好后的图片

klipperscreen主界面
klipperscreen设置界面
klipperscreen系统信息
klipperscreen设置
klipperscreenWIFI界面
酷比魔方 U100GT