我正在尝试在全新安装的 Ubuntu 20.04 上安装 Qtile。根据Qtile安装文档,Qtile 不再受支持apt
,建议从源安装。提供说明这里。
当我严格按照这些说明进行操作时,我收到一条错误消息,该命令出错并显示以下消息:
ERROR: Command errored out with exit status 1:
command: /home/yehuda/anaconda3/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-kvdwotq7/qtile_78329e7437d44395920938573a2554c8/setup.py'"'"'; __file__='"'"'/tmp/pip-install-kvdwotq7/qtile_78329e7437d44395920938573a2554c8/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-ja04qda9/install-record.txt --single-version-externally-managed --compile --install-headers /home/yehuda/anaconda3/include/python3.8/qtile
cwd: /tmp/pip-install-kvdwotq7/qtile_78329e7437d44395920938573a2554c8/
Complete output (21 lines):
Failed to find pulseaudio headers. PulseVolume widget will be unavailable
running install
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-install-kvdwotq7/qtile_78329e7437d44395920938573a2554c8/setup.py", line 91, in <module>
setup(
File "/home/yehuda/anaconda3/lib/python3.8/site-packages/setuptools/__init__.py", line 153, in setup
return distutils.core.setup(**attrs)
File "/home/yehuda/anaconda3/lib/python3.8/distutils/core.py", line 148, in setup
dist.run_commands()
File "/home/yehuda/anaconda3/lib/python3.8/distutils/dist.py", line 966, in run_commands
self.run_command(cmd)
File "/home/yehuda/anaconda3/lib/python3.8/distutils/dist.py", line 984, in run_command
cmd_obj.ensure_finalized()
File "/home/yehuda/anaconda3/lib/python3.8/distutils/cmd.py", line 107, in ensure_finalized
self.finalize_options()
File "/tmp/pip-install-kvdwotq7/qtile_78329e7437d44395920938573a2554c8/setup.py", line 46, in finalize_options
if not self.cairo_xcb_check():
File "/tmp/pip-install-kvdwotq7/qtile_78329e7437d44395920938573a2554c8/setup.py", line 40, in cairo_xcb_check
cairo.cairo_xcb_surface_create
ffi.error: symbol 'cairo_xcb_surface_create' not found in library 'libcairo.so.2': /home/yehuda/anaconda3/lib/python3.8/site-packages/../../libcairo.so.2: undefined symbol: cairo_xcb_surface_create
----------------------------------------
ERROR: Command errored out with exit status 1: /home/yehuda/anaconda3/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-kvdwotq7/qtile_78329e7437d44395920938573a2554c8/setup.py'"'"'; __file__='"'"'/tmp/pip-install-kvdwotq7/qtile_78329e7437d44395920938573a2554c8/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-ja04qda9/install-record.txt --single-version-externally-managed --compile --install-headers /home/yehuda/anaconda3/include/python3.8/qtile Check the logs for full command output.
发生了什么事,如何在 Debian-Ubuntu 系统上正确安装 Qtile?
答案1
我刚刚在 Ubuntu 20.04 上遇到了同样的问题。我通过安装 python3 和 pip3 作为系统包解决了这个问题,在此之前我只使用了 anaconda 并将其基本环境来源于我的.bashrc
.我成功安装了 qtile,执行以下操作:
sudo apt install python3 python3-distutils
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
python3 get-pip.py # I got a warning that /home/$USER/.local/bin wasn't on path so I added that in my .bashrc
pip3 install xcffib
pip3 install --no-cache-dir cairocffi
pip3 install dbus-next
pip3 install qtile
这对我有用。.bashrc
更改后不要忘记来源!
答案2
我遇到了同样的问题,但经过一番发现后我成功了
sudo apt install pip
pip install xcffib
pip install qtile
sudo cd /usr/share/xsessions/
sudo touch qtile.desktop
sudo echo "[Desktop Entry]
Name=Qtile
Comment=Qtile Session
Exec=qtile start
Type=Application
Keywords=wm;tiling" >> qtile.desktop
还将以下内容添加到 的开头~/.bashrc
:
PATH=$HOME/.local/bin:$PATH
只需将上述命令复制并粘贴到您的终端中,它就会为您完成安装过程。如果你也想使用我的Qtile配置,你可以在这里找到它。
我希望这可以帮助其他可能在 Linux Mint 上安装 Qtile 时遇到类似问题的人!