AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / user-925971

Gryu's questions

Martin Hope
Gryu
Asked: 2020-12-02 02:14:10 +0800 CST

如何在 Ubuntu 20.04 上创建 python2.7 virtualenv

  • 3

我想运行一个使用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 虚拟环境?

python-2.7 virtualenv 20.04
  • 1 个回答
  • 9858 Views
Martin Hope
Gryu
Asked: 2020-06-04 16:31:04 +0800 CST

在 Ubuntu 20.04 上安装 hplip-3.20.5 期间无法安装某些 python 包

  • 16

从 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 versions。

例如,我还可以看到,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。

hplip 20.04
  • 9 个回答
  • 15255 Views
Martin Hope
Gryu
Asked: 2020-04-21 11:09:58 +0800 CST

如何使用键盘快捷键在 Openbox 中切换键盘布局?

  • 2

我正在尝试通过 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 应用程序中不起作用。AltShiftbashbashsetxkbmap -layout rusetxkbmap

我已经安装了tint2面板,以便能够通过鼠标单击来切换键盘布局。

IBus Preferences -> Keyboard Shortcuts中的键盘快捷键实际上不会改变键盘布局。尝试了不同的组合键:

在此处输入图像描述

相同的偏好在 iceWM 中以某种方式起作用,但它在那里奇怪地起作用(当我输入不同的非英语布局时,它经常输入英文字母而不是西里尔字母。它需要删除这些字母几次,直到字母变成西里尔字母)。我不经常使用 Cyrillic,我可以登录 Unity 进行正常的键盘布局切换,但我想弄清楚如何在 Openbox 中正确配置它。

keyboard-layout shortcut-keys openbox 19.10
  • 1 个回答
  • 4938 Views
Martin Hope
Gryu
Asked: 2020-03-18 10:51:13 +0800 CST

如何从源代码安装更新的 supertux2

  • 0

我想通过玩 supertux2 来测试我的笔记本电脑和 pc 的显卡。事实证明,联想 G550 GL40 图形芯片组在 PC 上的性能优于 Nvidia G220。即使处理器几乎空闲,Nvidia GT220 上安装了专有驱动程序的图形也可以每 20-30 秒发生一次短时延迟。

我测试了 supertux2 v0.6.0 并通过了所有可用的游戏地图,所以待续...消息出现了。看应该更远的地图很有趣。所以我决定安装当前开发版本的supertux2。问题是如何?

software-installation games source-code 19.10
  • 1 个回答
  • 189 Views
Martin Hope
Gryu
Asked: 2020-02-17 04:13:14 +0800 CST

update-grub2 找不到自定义内核

  • 2

我已经编译了一个基于 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 更新期间列出。

我该如何解决这个问题?

grub2 kernel 19.10
  • 2 个回答
  • 734 Views
Martin Hope
Gryu
Asked: 2020-02-13 04:09:26 +0800 CST

Ubuntu 上的 Anydesk 不保存无人值守访问安全设置

  • 5

我尝试通过以下方式启用无人值守访问:

  1. 以 root 用户身份运行 Anydesk:sudo anydesk
  2. 转到设置 -> 安全
  3. 选中启用无人值守访问复选框
  4. 设置密码并点击确定按钮
    Anydesk无人值守密码设置

但是在确定按钮单击无人参与访问设置后没有更改:

单击确定按钮后的 Anydesk 设置

此外,远程连接到这台 PC 会显示一条消息,表明应在另一端接受连接。

有没有另一种方法可以在 ubuntu 中配置无人值守访问?

remote-access 19.10 anydesk
  • 1 个回答
  • 24873 Views
Martin Hope
Gryu
Asked: 2020-02-06 07:52:09 +0800 CST

蓝牙适配器配置问题 (ID 0a12:0001)

  • 7

我的蓝牙适配器在 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.5.2 内核。但它无法登录,所以我已经清除它并返回到我的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'
    
bluetooth 19.10
  • 5 个回答
  • 30056 Views
Martin Hope
Gryu
Asked: 2019-08-03 03:46:56 +0800 CST

出现像框一样的缩放。如何禁用它?

  • 1

我不知道像缩放功能这样的可访问性是如何出现的。也许我输入了一些键的组合。我不知道如何摆脱它。我试图在以下位置禁用它:

开始菜单 -> 设置管理器 -> 设置编辑器 -> xfwm4

取消选中zoom_desktop值,但这个框架并没有消失。

这里是:

在此处输入图像描述

xubuntu 19.04
  • 1 个回答
  • 42 Views

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    如何运行 .sh 脚本?

    • 16 个回答
  • Marko Smith

    如何安装 .tar.gz(或 .tar.bz2)文件?

    • 14 个回答
  • Marko Smith

    如何列出所有已安装的软件包

    • 24 个回答
  • Marko Smith

    无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗?

    • 25 个回答
  • Martin Hope
    Flimm 如何在没有 sudo 的情况下使用 docker? 2014-06-07 00:17:43 +0800 CST
  • Martin Hope
    Ivan 如何列出所有已安装的软件包 2010-12-17 18:08:49 +0800 CST
  • Martin Hope
    La Ode Adam Saputra 无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗? 2010-11-30 18:12:48 +0800 CST
  • Martin Hope
    David Barry 如何从命令行确定目录(文件夹)的总大小? 2010-08-06 10:20:23 +0800 CST
  • Martin Hope
    jfoucher “以下软件包已被保留:”为什么以及如何解决? 2010-08-01 13:59:22 +0800 CST
  • Martin Hope
    David Ashford 如何删除 PPA? 2010-07-30 01:09:42 +0800 CST

热门标签

10.10 10.04 gnome networking server command-line package-management software-recommendation sound xorg

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve