我想运行一个使用python2.7版本的应用程序,但默认没有安装python2.7。当我尝试使用时:
$ virtualenv -p python2 flaskold
它返回:
RuntimeError: failed to find interpreter for Builtin discover of python_spec='python2'
如何在没有 python 2.7 支持的 Ubuntu 20.04 上创建 python2.7 虚拟环境?
我想运行一个使用python2.7版本的应用程序,但默认没有安装python2.7。当我尝试使用时:
$ virtualenv -p python2 flaskold
它返回:
RuntimeError: failed to find interpreter for Builtin discover of python_spec='python2'
如何在没有 python 2.7 支持的 Ubuntu 20.04 上创建 python2.7 虚拟环境?
从 19.10 升级到 20.04 后,我自动删除了许多已弃用的软件包。在 hplip 升级期间,我已确认使用维护者版本的配置文件。但是 Ubuntu 重新启动后,hp 1020 打印机停止打印。每次我刷新它的窗口时,Hplip 工具箱都会挂起。所以我已经完全清除并卸载了 hplip。
使用本指南安装会安装之前安装的 hplip 3.20.3 版本。
所以我从这里为 Ubuntu 下载了 3.20.5 版本,并在x
许可的情况下对其进行了修改并运行它:./hplip-3.20.5.run
.
它询问我是否要安装缺少的依赖项:
Package-Name Component Required/Optional
pyqt5-dbus gui_qt5 OPTIONAL
reportlab fax OPTIONAL
pyqt5 gui_qt5 REQUIRED
python-notify gui_qt5 OPTIONAL
我说y
,但是,对于python-pyqt5
包裹,我有:
error: Command failed. Re-try #3...
Running 'sudo apt-get install --assume-yes python-pyqt5'
Please wait, this may take several minutes...
error: Package install command failed with error code 100
对于python-dbus.mainloop.pyqt5
包裹:
error: Command failed. Re-try #3...
Running 'sudo apt-get install --assume-yes python-dbus.mainloop.pyqt5'
Please wait, this may take several minutes...
error: Package install command failed with error code 100
对于python-notify
包裹:
error: Command failed. Re-try #3...
Running 'sudo apt-get install --assume-yes python-notify'
Please wait, this may take several minutes...
error: Package install command failed with error code 100
对于python-reportlab
:
error: Command failed. Re-try #3...
Running 'sudo apt-get install --assume-yes python-reportlab'
Please wait, this may take several minutes...
error: Package install command failed with error code 100
我跳过了这些软件包的安装,因为无法安装它们。最后,我得到了下一个错误:
warning: Some HPLIP functionality might not function due to missing package(s).
error: A required dependency 'pyqt5 (PyQt 5- Qt interface for Python (for Qt version 4.x))' is still missing.
RUNNING POST-PACKAGE COMMANDS
-----------------------------
OK
RE-CHECKING DEPENDENCIES
------------------------
error: A required dependency 'pyqt5 (PyQt 5- Qt interface for Python (for Qt version 4.x))' is still missing.
error: Installation cannot continue without this dependency.
error: Please manually install this dependency and re-run this installer.
我也hplip-3.20.5-plugin.run
从这里下载
$ bash hplip-3.20.5-plugin.run
Verifying archive integrity... All good.
Uncompressing HPLIP 3.20.5 Plugin Self Extracting Archive..............................................................
Error setting home directory: /etc/hp/hplip.conf not found. Is HPLIP installed?
Universe/Multiverse 存储库已启用,但是:
$ apt-cache search python-pyqt5
python-pyqt5.qwt-doc - Python Qwt6 technical widget library, documentation and examples
$ apt-cache search python-reportlab
python-reportlab-doc - Documentation for the ReportLab Python library (PDF format)
$ apt-cache search python-dbus.mainloop.pyqt5
$ apt-cache search python-notify
python3-notify2 - desktop notifications API for Python 3
软件包python3-pyqt5
, python3-reportlab
, python3-notify2
,python3-dbus.mainloop.pyqt5
已安装并且是already the newest version
s。
例如,我还可以看到,python-pyqt5
包在 19.10 存储库中可用,但是这个包需要qtbase-abi-5-12-4
在 eoan 的存储库中不存在的包。18.04 的python-pyqt5
包需要不同的 qtbase-abi 包,这在 Bionic 的存储库中不存在。
这是否意味着 phlip-3.20.5 与 20.04 不兼容,或者可能存在一些包含这四个包及其依赖项的附加存储库?
更新:
已安装hplip
, hplip-data
,hplip-gui
包。
从启动器启动 hplip-gui
收到登录信息journalctl -f
:
Jun 07 23:14:13 ubuntu hplip.desktop[17823]: error: Unable to locate models.dat file
Jun 07 23:14:13 ubuntu /hp-toolbox[17823]: [17823]: error: Unable to locate models.dat file
Jun 07 23:14:13 ubuntu hplip.desktop[17823]: HP Linux Imaging and Printing System (ver. 0.0.0)
Jun 07 23:14:13 ubuntu hplip.desktop[17823]: HP Device Manager ver. 15.0
Jun 07 23:14:13 ubuntu hplip.desktop[17823]: Copyright (c) 2001-18 HP Development Company, LP
Jun 07 23:14:13 ubuntu hplip.desktop[17823]: This software comes with ABSOLUTELY NO WARRANTY.
Jun 07 23:14:13 ubuntu hplip.desktop[17823]: This is free software, and you are welcome to distribute it
Jun 07 23:14:13 ubuntu hplip.desktop[17823]: under certain conditions. See COPYING file for more details.
Jun 07 23:14:13 ubuntu hplip.desktop[17823]: Traceback (most recent call last):
Jun 07 23:14:13 ubuntu hplip.desktop[17823]: File "/usr/bin/hp-toolbox", line 269, in <module>
Jun 07 23:14:13 ubuntu hplip.desktop[17823]: QApplication, ui_package = utils.import_dialog(ui_toolkit)
Jun 07 23:14:13 ubuntu hplip.desktop[17823]: TypeError: cannot unpack non-iterable NoneType object
hplip-gui
尚未启动:桌面上没有出现任何内容。
较新的 hplip-3.20.6也不支持 Ubuntu 20.04。
我正在尝试通过 Openbox DE 中的键盘快捷键配置键盘布局切换。
$ cat /etc/default/keyboard
XKBLAYOUT="us,ua,ru"
XKBVARIANT=",winkeys,"
BACKSPACE="guess"
XKBMODEL="pc105"
XKBOPTIONS="grp:alt_shift_toggle,grp:win_space_toggle,grp_led:scroll"
$ cat /etc/bash.bashrc | grep kblayout
source /home/user/.kblayout.sh
$ cat /home/user/.kblayout.sh
#!/bin/bash
setxkbmap -layout us,ru,ua -option grp:lwin_space_toggle
$ setxkbmap -print -verbose 10
Setting verbose level to 10
locale is C
Trying to load rules file /usr/share/X11/xkb/rules/evdev...
Success.
Applied rules from /usr/share/X11/xkb/rules/evdev:
rules: /usr/share/X11/xkb/rules/evdev
model: pc105
layout: us
options: grp:alt_shift_toggle,grp:lalt_lshift_toggle,grp:alt_shift_toggle,grp:win_space_toggle,grp_led:scroll,grp:alt_shift_toggle,grp_led:scroll
Trying to build keymap using the following components:
keycodes: evdev+aliases(qwerty)
types: complete
compat: complete+ledscroll(group_lock)
symbols: pc+us+inet(evdev)+group(win_space_toggle)+group(lalt_lshift_toggle)+group(alt_shift_toggle)
geometry: pc(pc105)
xkb_keymap {
xkb_keycodes { include "evdev+aliases(qwerty)" };
xkb_types { include "complete" };
xkb_compat { include "complete+ledscroll(group_lock)" };
xkb_symbols { include "pc+us+inet(evdev)+group(win_space_toggle)+group(lalt_lshift_toggle)+group(alt_shift_toggle)" };
xkb_geometry { include "pc(pc105)" };
};
$ cat .config/gxkb/gxkb.cfg
[xkb config]
group_policy=2
default_group=0
never_modify_config=false
model=pc105
layouts=us,ru,ua
variants=
toggle_option=grp:lwin_toggle,lv3:switch,terminate:ctrl_alt_bksp,grp_led:scroll
compose_key_position=
$ cat /etc/X11/xorg.conf
Section "InputClass"
Identifier "system-keyboard"
MatchIsKeyboard "on"
Option "XkbLayout" "us,ru,ua"
Option "XkbModel" "pc105"
Option "XkbVariant" "pc105"
Option "XkbOptions" "grp:alt_shift_toggle,grp_led:scroll"
EndSection
对于终端窗口输入Win,在Space我运行. 对于它的新实例有效,但不适用于刚刚打开的终端中的 bash。或者在终端中也可以使用的任何东西。在当前终端会话中,没有运行新的 bash 实例,我运行命令或使用该命令获取脚本。但它在 Openbox GUI 应用程序中不起作用。AltShiftbash
bash
setxkbmap -layout ru
setxkbmap
我已经安装了tint2
面板,以便能够通过鼠标单击来切换键盘布局。
IBus Preferences -> Keyboard Shortcuts中的键盘快捷键实际上不会改变键盘布局。尝试了不同的组合键:
相同的偏好在 iceWM 中以某种方式起作用,但它在那里奇怪地起作用(当我输入不同的非英语布局时,它经常输入英文字母而不是西里尔字母。它需要删除这些字母几次,直到字母变成西里尔字母)。我不经常使用 Cyrillic,我可以登录 Unity 进行正常的键盘布局切换,但我想弄清楚如何在 Openbox 中正确配置它。
我想通过玩 supertux2 来测试我的笔记本电脑和 pc 的显卡。事实证明,联想 G550 GL40 图形芯片组在 PC 上的性能优于 Nvidia G220。即使处理器几乎空闲,Nvidia GT220 上安装了专有驱动程序的图形也可以每 20-30 秒发生一次短时延迟。
我测试了 supertux2 v0.6.0 并通过了所有可用的游戏地图,所以待续...消息出现了。看应该更远的地图很有趣。所以我决定安装当前开发版本的supertux2。问题是如何?
我已经编译了一个基于 5.4.18-xanmod10 内核的新内核。然后我安装了它:
sudo dpkg -i linux*5.4.18-xanmod10-custom*.deb
但是安装后没有找到update-grub2
:
root@lenovo:~# ls /boot/
config-5.3.0-29-lowlatency memtest86+.elf
config-5.4.18-xanmod10-custom memtest86+_multiboot.bin
config-5.5.0-3.2-liquorix-amd64 System.map-5.3.0-29-lowlatency
config-5.5.0-4.1-liquorix-amd64 System.map-5.4.18-xanmod10-custom
config-5.5.4-xanmod3 System.map-5.5.0-3.2-liquorix-amd64
grub System.map-5.5.0-4.1-liquorix-amd64
initrd.img System.map-5.5.4-xanmod3
initrd.img-5.3.0-29-lowlatency vmlinuz
initrd.img-5.4.18-xanmod10-custom vmlinuz-5.3.0-29-lowlatency
initrd.img-5.5.0-3.2-liquorix-amd64 vmlinuz-5.4.18-xanmod10-custom
initrd.img-5.5.0-4.1-liquorix-amd64 vmlinuz-5.5.0-3.2-liquorix-amd64
initrd.img-5.5.4-xanmod3 vmlinuz-5.5.0-4.1-liquorix-amd64
initrd.img.old vmlinuz-5.5.4-xanmod3
memtest86+.bin vmlinuz.old
root@lenovo:~# update-grub2
Sourcing file `/etc/default/grub'
Sourcing file `/etc/default/grub.d/init-select.cfg'
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-5.3.0-29-lowlatency
Found initrd image: /boot/initrd.img-5.3.0-29-lowlatency
Found linux image: /boot/vmlinuz-5.3.0-29-lowlatency
Found initrd image: /boot/initrd.img-5.3.0-29-lowlatency
Found memtest86+ image: /boot/memtest86+.elf
Found memtest86+ image: /boot/memtest86+.bin
done
还有其他内核存在,但重新启动后lowlatency
,grub 菜单中只存在内核和 memtest。此外,在更新期间,它两次显示相同的内核。以前,在通用内核移动到另一个文件夹之前,通用内核和低延迟内核已在 grub 更新期间列出。
我该如何解决这个问题?
我的蓝牙适配器在 Ubuntu 中不起作用。
$ lsusb | grep tooth
Bus 002 Device 003: ID 0a12:0001 Cambridge Silicon Radio, Ltd Bluetooth Dongle (HCI mode)
$ hciconfig
hci0: Type: Primary Bus: USB
BD Address: 33:03:30:09:74:B4 ACL MTU: 360:4 SCO MTU: 0:0
DOWN
RX bytes:1106 acl:0 sco:0 events:56 errors:0
TX bytes:736 acl:0 sco:0 commands:60 errors:0
$ sudo hciconfig hci0 up
Can't init device hci0: Operation not supported (95)
$ bluetoothctl
Agent registered
[bluetooth]# power on
No default controller available
$ hcitool dev
Devices:
$
$ rfkill
ID TYPE DEVICE SOFT HARD
0 bluetooth hci0 unblocked unblocked
1 wlan phy0 unblocked unblocked
尝试了最后两个动作:
Bluetake
在 Ubuntu v10.04 ~ 11.04 中开箱即用,但在 11.10 中停止可靠工作,频繁的内核恐慌和其他一般不好的东西,[错误:901770]
$ lsusb <br>Bus 007 Device 003: ID 0a12:0001 Cambridge Silicon Radio, Ltd Bluetooth Dongle (HCI mode)
$ hciconfig -a hci0 <br>Manufacturer: Cambridge Silicon Radio (10)
可能需要与 Belkin 相同的修复:添加
blacklist hci_usb
到/etc/modprobe.d/blacklist.conf
,然后添加hci_usb reset=1
到/etc/modules
也试过
5.3.0-29-generic
内核。$ make -C /lib/modules/$(uname -r)/build M=$PWD modules
make: Entering directory '/usr/src/linux-headers-5.3.0-29-generic'
CC [M] /home/spacer/kernel/bluetooth/hci_vhci.o
/home/spacer/kernel/bluetooth/hci_vhci.c: In function ‘vhci_create_device’:
/home/spacer/kernel/bluetooth/hci_vhci.c:134:2: warning: dereferencing ‘void *’ pointer
134 | *skb_put(skb, 1) = 0xff;
| ^~~~~~~~~~~~~~~~
/home/spacer/kernel/bluetooth/hci_vhci.c:134:19: error: invalid use of void expression
134 | *skb_put(skb, 1) = 0xff;
| ^
/home/spacer/kernel/bluetooth/hci_vhci.c:135:2: warning: dereferencing ‘void *’ pointer
135 | *skb_put(skb, 1) = dev_type;
| ^~~~~~~~~~~~~~~~
/home/spacer/kernel/bluetooth/hci_vhci.c:135:19: error: invalid use of void expression
135 | *skb_put(skb, 1) = dev_type;
| ^
/home/spacer/kernel/bluetooth/hci_vhci.c: In function ‘vhci_get_user’:
/home/spacer/kernel/bluetooth/hci_vhci.c:203:19: error: ‘HCI_BREDR’ undeclared (first use in this function)
203 | if (dev_type != HCI_BREDR && dev_type != HCI_AMP)
| ^~~~~~~~~
/home/spacer/kernel/bluetooth/hci_vhci.c:203:19: note: each undeclared identifier is reported only once for each function it appears in
/home/spacer/kernel/bluetooth/hci_vhci.c: In function ‘vhci_open_timeout’:
/home/spacer/kernel/bluetooth/hci_vhci.c:307:43: error: ‘HCI_BREDR’ undeclared (first use in this function)
307 | vhci_create_device(data, amp ? HCI_AMP : HCI_BREDR);
| ^~~~~~~~~
/home/spacer/kernel/bluetooth/hci_vhci.c: At top level:
/home/spacer/kernel/bluetooth/hci_vhci.c:352:3: error: ‘const struct file_operations’ has no member named ‘aio_write’
352 | .aio_write = vhci_write,
| ^~~~~~~~~
/home/spacer/kernel/bluetooth/hci_vhci.c:352:15: error: positional initialization of field in ‘struct’ declared with ‘designated_init’ attribute [-Werror=designated-init]
352 | .aio_write = vhci_write,
| ^~~~~~~~~~
/home/spacer/kernel/bluetooth/hci_vhci.c:352:15: note: (near initialization for ‘vhci_fops’)
/home/spacer/kernel/bluetooth/hci_vhci.c:352:15: error: initialization of ‘ssize_t (*)(struct file *, const char *, size_t, loff_t *)’ {aka ‘long int (*)(struct file *, const char *, long unsigned int, long long int *)’} from incompatible pointer type ‘ssize_t (*)(struct kiocb *, const struct iovec *, long unsigned int, loff_t)’ {aka ‘long int (*)(struct kiocb *, const struct iovec *, long unsigned int, long long int)’} [-Werror=incompatible-pointer-types]
/home/spacer/kernel/bluetooth/hci_vhci.c:352:15: note: (near initialization for ‘vhci_fops.write’)
cc1: some warnings being treated as errors
make[1]: *** [scripts/Makefile.build:290: /home/spacer/kernel/bluetooth/hci_vhci.o] Error 1
make: *** [Makefile:1655: _module_/home/spacer/kernel/bluetooth] Error 2
make: Leaving directory '/usr/src/linux-headers-5.3.0-29-generic'