我在安装基于Python的应用程序(键和鼠标,宏记录应用程序)时遇到这个问题:机器人):
so@sosa:/media/so/915b062e-7148-4edb-8355-1d342f97edfd/so/Downloads$ sudo dpkg -i robotux_0.4_all.deb
Selecting previously unselected package robotux.
(Reading database ... 148292 files and directories currently installed.)
Preparing to unpack robotux_0.4_all.deb ...
Unpacking robotux (0.4) ...
dpkg: dependency problems prevent configuration of robotux:
robotux depends on python:any (>= 2.6.6-7~).
robotux depends on python-xlib; however:
Package python-xlib is not installed.
robotux depends on gir1.2-appindicator3-0.1; however:
Package gir1.2-appindicator3-0.1 is not installed.
dpkg: error processing package robotux (--install):
dependency problems - leaving unconfigured
Processing triggers for gnome-menus (3.36.0-1ubuntu1) ...
Processing triggers for desktop-file-utils (0.24-1ubuntu2) ...
Processing triggers for mime-support (3.64ubuntu1) ...
Errors were encountered while processing:
robotux
我的操作系统版本是:
so@sosa:/media/so/915b062e-7148-4edb-8355-1d342f97edfd/so/Downloads$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu Groovy Gorilla (development branch)
Release: 20.10
Codename: groovy
更新:
我还安装了gir1.2-appindicator3-0.1
synaptic 并在 Ubuntu 20 中安装了 pyhton2 并python-xlib
通过下载它和通过python setup.py install
如下命令手动安装:
so@sosa:~/Downloads/pip-20.1.1$ pip install python-xlib
DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 will drop support for Python 2.7 in January 2021. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support
Defaulting to user installation because normal site-packages is not writeable
Requirement already satisfied: python-xlib in /usr/local/lib/python2.7/dist-packages/python_xlib-0.27-py2.7.egg (0.27)
Requirement already satisfied: six>=1.10.0 in /usr/local/lib/python2.7/dist-packages/six-1.15.0-py2.7.egg (from python-xlib) (1.15.0)
so@sosa:~/Downloads/pip-20.1.1$
但我又遇到了这个问题,就像这样:
$ sudo apt -f install ./robotux_0.4_all.deb
[sudo] password for so:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
Note, selecting 'robotux' instead of './robotux_0.4_all.deb'
robotux is already the newest version (0.4).
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
robotux : Depends: python-xlib but it is not installable
E: Unable to correct problems, you have held broken packages.
或者通过包装袋:
$ sudo dpkg -i robotux_0.4_all.deb
(Reading database ... 150837 files and directories currently installed.)
Preparing to unpack robotux_0.4_all.deb ...
Unpacking robotux (0.4) over (0.4) ...
dpkg: dependency problems prevent configuration of robotux:
robotux depends on python-xlib; however:
Package python-xlib is not installed.
dpkg: error processing package robotux (--install):
dependency problems - leaving unconfigured
Processing triggers for gnome-menus (3.36.0-1ubuntu1) ...
Processing triggers for desktop-file-utils (0.24-1ubuntu2) ...
Processing triggers for mime-support (3.64ubuntu1) ...
Errors were encountered while processing:
robotux
谢谢。
答案1
在 Ubuntu 20.10 中安装 Ubuntu 20.04 的 python-xlib 软件包。 python-xlib 在 Ubuntu 20.10 默认存储库中有两个依赖项,可以通过 apt 安装。打开终端并输入。
sudo apt update
sudo apt install python2 python-six
wget -c http://mirrors.kernel.org/ubuntu/pool/universe/p/python-xlib/python-xlib_0.23-2build1_all.deb
sudo apt install ./python-xlib_0.23-2build1_all.deb
将目录更改为cd
包含 robots_0.4_all.deb 的目录并运行以下命令来安装 Robotux。
sudo apt install ./robotux_0.4_all.deb