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-32792

k0pernikus's questions

Martin Hope
k0pernikus
Asked: 2025-02-10 21:08:42 +0800 CST

如何防止“apt-key”stdout/警告的任何输出?只有在发生错误时才应显示错误

  • 8

我意识到了安全隐患,也理解了为什么 apt-key 被弃用。但就我的使用情况而言,我并不关心。

我想要运行:

$ apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys CC116F55AA7F2382

没有任何警告。但我看到:

apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys CC116F55AA7F2382 
Warning: apt-key is deprecated. Manage keyring files in trusted.gpg.d instead (see apt-key(8)).
Executing: /tmp/apt-key-gpghome.KVaQ390iTM/gpg.1.sh --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys CC116F55AA7F2382 /dev/null
gpg: "/dev/null" not a key ID: skipping
gpg: key CC116F55AA7F2382: "Icinga GmbH (Build server) <[email protected]>" not changed
gpg: Total number processed: 1
gpg:              unchanged: 1

如何强制不输出 stdout 和警告?我只想看到实际发生的错误的输出。(我知道该脚本在已经知道密钥的系统上运行,因为我之前已经运行过它。)


我试过:

  • apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys CC116F55AA7F2382 > /dev/null
  • apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys CC116F55AA7F2382 2>&1 > /dev/null
  • apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys CC116F55AA7F2382 2>&1 /dev/null
apt
  • 1 个回答
  • 99 Views
Martin Hope
k0pernikus
Asked: 2019-12-08 07:16:59 +0800 CST

升级到 19.10 后如何修复卡住的启动?

  • 1

升级到 Ubuntu 19.10 后,我的 Thinkpad x230 在启动过程中卡住了。有时,它可以工作,但大多数时候我只看到一个加载图标(带有字母 S 的蓝色图标),我必须强制重启。

boot 19.10
  • 1 个回答
  • 1098 Views
Martin Hope
k0pernikus
Asked: 2019-03-27 01:46:33 +0800 CST

如何从源代码构建最新的 curl 以允许通过 sftp 下载文件?

  • 6

我需要从 sftp 服务器下载文件。不幸的是,Ubuntu 中的 curl 版本

7.58.0-2ubuntu3.6 amd64

不支持sftp。

我收到错误消息

Protocol "sftp" not supported or disabled in libcurl

尝试下载文件时。因此,我想curl从源代码构建以允许 sftp。我该如何做到这一点?

compiling sftp make 18.04 curl
  • 1 个回答
  • 7553 Views
Martin Hope
k0pernikus
Asked: 2018-03-15 04:08:13 +0800 CST

我是否必须手动修复中断的 dist 升级?

  • 4

在运行期间apt-get dist-upgrade,我在设置软件包时不小心通过 Ctrl + C 取消了它。

这些软件包即将更新:

aptdaemon aptdaemon-data google-chrome-unstable libsmbclient libwbclient0 python3-aptdaemon python3-aptdaemon.gtk3widgets samba-libs

这是取消之前的运行输出:

Preparing to unpack .../0-google-chrome-unstable_66.0.3359.26-1_amd64.deb ...
Unpacking google-chrome-unstable (66.0.3359.26-1) over (66.0.3359.22-1) ...
Preparing to unpack .../1-libsmbclient_2%3a4.6.7+dfsg-1ubuntu3.2_amd64.deb ...
Unpacking libsmbclient:amd64 (2:4.6.7+dfsg-1ubuntu3.2) over (2:4.6.7+dfsg-1ubuntu3.1) ...
Preparing to unpack .../2-samba-libs_2%3a4.6.7+dfsg-1ubuntu3.2_amd64.deb ...
Unpacking samba-libs:amd64 (2:4.6.7+dfsg-1ubuntu3.2) over (2:4.6.7+dfsg-1ubuntu3.1) ...
Preparing to unpack .../3-libwbclient0_2%3a4.6.7+dfsg-1ubuntu3.2_amd64.deb ...
Unpacking libwbclient0:amd64 (2:4.6.7+dfsg-1ubuntu3.2) over (2:4.6.7+dfsg-1ubuntu3.1) ...
Preparing to unpack .../4-aptdaemon-data_1.1.1+bzr982-0ubuntu17.1_all.deb ...
Unpacking aptdaemon-data (1.1.1+bzr982-0ubuntu17.1) over (1.1.1+bzr982-0ubuntu17) ...
Preparing to unpack .../5-python3-aptdaemon.gtk3widgets_1.1.1+bzr982-0ubuntu17.1_all.deb ...
Unpacking python3-aptdaemon.gtk3widgets (1.1.1+bzr982-0ubuntu17.1) over (1.1.1+bzr982-0ubuntu17) ...
Preparing to unpack .../6-aptdaemon_1.1.1+bzr982-0ubuntu17.1_all.deb ...
Unpacking aptdaemon (1.1.1+bzr982-0ubuntu17.1) over (1.1.1+bzr982-0ubuntu17) ...
Preparing to unpack .../7-python3-aptdaemon_1.1.1+bzr982-0ubuntu17.1_all.deb ...
Unpacking python3-aptdaemon (1.1.1+bzr982-0ubuntu17.1) over (1.1.1+bzr982-0ubuntu17) ...
Setting up aptdaemon-data (1.1.1+bzr982-0ubuntu17.1) ...
Setting up libwbclient0:amd64 (2:4.6.7+dfsg-1ubuntu3.2) ...
Setting up samba-libs:amd64 (2:4.6.7+dfsg-1ubuntu3.2) ...
Processing triggers for mime-support (3.60ubuntu1) ...
Processing triggers for desktop-file-utils (0.23-1ubuntu3) ...
Setting up libsmbclient:amd64 (2:4.6.7+dfsg-1ubuntu3.2) ...
Setting up google-chrome-unstable (66.0.3359.26-1) ...
Processing triggers for libc-bin (2.26-0ubuntu2.1) ...
Processing triggers for man-db (2.7.6.1-2) ...
Processing triggers for gnome-menus (3.13.3-6ubuntu5) ...
Processing triggers for dbus (1.10.22-1ubuntu1) ...
Processing triggers for hicolor-icon-theme (0.17-1) ...
Setting up aptdaemon (1.1.1+bzr982-0ubuntu17.1) ...
Setting up python3-aptdaemon (1.1.1+bzr982-0ubuntu17.1) ...
Setting up python3-aptdaemon.gtk3widgets (1.1.1+bzr982-0ubuntu17.1) ...
W: Operation was interrupted before it could finish

我现在想知道我的系统上是否有任何处于损坏状态的东西。我尝试运行:

sudo dpkg --configure -a

然而没有任何报道。

如果我运行:

sudo apt-get dist-upgrade
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

注意到变化。我想知道:我的系统有什么问题吗?我怎么知道?如果有东西坏了,我将如何修复它?

package-management upgrade dpkg apt 17.10
  • 1 个回答
  • 4631 Views
Martin Hope
k0pernikus
Asked: 2018-03-01 09:00:15 +0800 CST

如何启用双星**(globstar)运算符?

  • 10

我知道有一个类似于 的运算符*,不同之处在于它适用于所有子目录。

假设您有一个文件夹结构:

.
├── bar
│   ├── foo
│   │   └── baz
│   │       └── hurz
│   │           └── lolz
│   │               └── hello.txt
│   └── poit.txt
└── fnord.txt

然后ls用单星*列出:

$ ls *.txt
fnord.txt

我希望双星运算符**可以处理子文件夹,但它并不完整。我知道这可以工作,因为我在另一台机器上启用了它,但我忘记了如何。

$ ls **/*.txt
bar/poit.txt

我期待输出看起来像:

ls **/*.txt
bar/foo/baz/hurz/lolz/hello.txt  bar/poit.txt  fnord.txt

如何**调用操作员以及如何正确激活它?

command-line bash
  • 1 个回答
  • 5602 Views
Martin Hope
k0pernikus
Asked: 2018-02-16 07:03:33 +0800 CST

如何不总是在 gnome-shell 中显示左侧的 Ubuntu Dock?

  • 4

我安装了一个全新的 Ubuntu 17.10 (GNOME)。

它的 GNOME Shell 似乎已被修改为与 Unity shell 类似,因此在左侧面板上我总是看到一个面板(又名 Ubuntu Dock)提供图标来启动不同的应用程序。

启用侧边栏的 gnome shell 桌面屏幕截图始终显示在左侧

我发现在全屏窗口中运行的程序特别烦人。

如何使侧边栏在正常模式下始终消失?

我不介意在默认情况下通过超级键访问的“活动概览”中看到它,但我不想看到我何时在桌面或其他应用程序中。

我想保留标题栏。

最后,如果有人在 Ubuntu 16.04 上切换到 GNOME shell,我正在寻找提供的类似体验。

gnome taskbar gnome-shell 17.10 ubuntu-dock
  • 2 个回答
  • 6616 Views
Martin Hope
k0pernikus
Asked: 2016-11-19 06:17:02 +0800 CST

如何让docker引擎重新启动?

  • 1

硬重启后,我的 docker 引擎不再启动:

$ sudo service docker restart
Job for docker.service failed because the control process exited with error code. See "systemctl status docker.service" and "journalctl -xe" for details.

这是systemctl电话:

$ systemctl status docker.service
● docker.service - Docker Application Container Engine
   Loaded: loaded (/lib/systemd/system/docker.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Fr 2016-11-18 15:11:31 CET; 16s ago
     Docs: https://docs.docker.com
  Process: 4340 ExecStart=/usr/bin/dockerd -H fd:// (code=exited, status=1/FAILURE)
 Main PID: 4340 (code=exited, status=1/FAILURE)

这是journalctl:

$ journalctl -xe
-- Unit docker.socket has begun starting up.
Nov 18 15:11:30 fluttershy systemd[1]: Listening on Docker Socket for the API.
-- Subject: Unit docker.socket has finished start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit docker.socket has finished starting up.
-- 
-- The start-up result is done.
Nov 18 15:11:30 fluttershy systemd[1]: Starting Docker Application Container Engine...
-- Subject: Unit docker.service has begun start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit docker.service has begun starting up.
Nov 18 15:11:30 fluttershy dockerd[4340]: time="2016-11-18T15:11:30.765156842+01:00" level=info msg="libcontainerd: new containerd process, pid: 4349"
Nov 18 15:11:31 fluttershy audit[4361]: AVC apparmor="STATUS" operation="profile_replace" profile="unconfined" name="docker-default" pid=4361 comm="apparmor_p
Nov 18 15:11:31 fluttershy kernel: audit: type=1400 audit(1479478291.790:34): apparmor="STATUS" operation="profile_replace" profile="unconfined" name="docker-
Nov 18 15:11:31 fluttershy dockerd[4340]: time="2016-11-18T15:11:31.799138238+01:00" level=info msg="[graphdriver] using prior storage driver \"aufs\""
Nov 18 15:11:31 fluttershy dockerd[4340]: time="2016-11-18T15:11:31.908304680+01:00" level=fatal msg="Error starting daemon: layer does not exist"
Nov 18 15:11:31 fluttershy systemd[1]: docker.service: Main process exited, code=exited, status=1/FAILURE
Nov 18 15:11:31 fluttershy systemd[1]: Failed to start Docker Application Container Engine.
-- Subject: Unit docker.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit docker.service has failed.
-- 
-- The result is failed.
Nov 18 15:11:31 fluttershy systemd[1]: docker.service: Unit entered failed state.
Nov 18 15:11:31 fluttershy systemd[1]: docker.service: Failed with result 'exit-code'.
Nov 18 15:11:31 fluttershy sudo[4330]: pam_unix(sudo:session): session closed for user root

我不知道如何继续以及如何让 docker 重新启动。

16.04
  • 1 个回答
  • 5381 Views
Martin Hope
k0pernikus
Asked: 2016-06-04 07:29:38 +0800 CST

如何让 docker0 桥接回来?

  • 3

从我的网络设置中删除一堆过时的条目后,我意外删除了 Bridge (docker0),现在我的容器无法连接到 Internet。

我该如何取回它?它应该看起来像:

显示 docker 桥的网络配置屏幕截图

networking
  • 1 个回答
  • 6674 Views
Martin Hope
k0pernikus
Asked: 2016-06-02 09:06:38 +0800 CST

为什么 chrome dev 频道不再通过 apt-get upgrade 升级 Chrome?

  • 6

我使用 Chrome 开发频道有一段时间了,习惯于通过以下方式获取更新:

apt-get update && apt-get upgrade

最近我发现我的开发频道保持不变,我必须google-chrome-unstable_current_amd64.deb从谷歌重新下载,然后通过软件中心进行升级。

如何始终获得 Chrome 开发者频道的升级?

apt
  • 1 个回答
  • 711 Views
Martin Hope
k0pernikus
Asked: 2016-06-01 04:01:53 +0800 CST

如何保持显示设置?

  • 3

我的显示配置保持这样:

应有的显示配置

然而,每次重新启动后,它都会重置为:

默认显示设置

如何让它持久?

我的xrandr输出:

Screen 0: minimum 8 x 8, current 4920 x 1920, maximum 32767 x 32767
eDP1 connected 1920x1080+0+0 (normal left inverted right x axis y axis) 309mm x 174mm
   1920x1080      60.0*+   59.9     48.0  
   1680x1050      60.0     59.9  
   1600x1024      60.2  
   1400x1050      60.0  
   1600x900       60.0  
   1280x1024      60.0  
   1440x900       59.9  
   1280x960       60.0  
   1368x768       60.0  
   1360x768       59.8     60.0  
   1152x864       60.0  
   1280x720       60.0  
   1024x768       60.0  
   1024x576       60.0  
   960x540        60.0  
   800x600        60.3     56.2  
   864x486        60.0  
   640x480        59.9  
   720x405        60.0  
   640x360        60.0  
DP1 disconnected (normal left inverted right x axis y axis)
DP1-1 disconnected (normal left inverted right x axis y axis)
DP1-2 disconnected (normal left inverted right x axis y axis)
DP1-3 connected primary 1080x1920+1920+0 left (normal left inverted right x axis y axis) 477mm x 268mm
   1920x1080      60.0*+
   1680x1050      60.0  
   1600x900       60.0  
   1280x1024      75.0     60.0  
   1280x800       59.8  
   1152x864       75.0  
   1280x720       60.0  
   1024x768       75.1     60.0  
   832x624        74.6  
   800x600        75.0     60.3  
   640x480        75.0     60.0  
   720x400        70.1  
HDMI1 connected 1920x1080+3000+0 (normal left inverted right x axis y axis) 477mm x 268mm
   1920x1080      60.0*+
   1680x1050      59.9  
   1600x900       60.0  
   1280x1024      75.0     60.0  
   1280x800       59.9  
   1152x864       75.0  
   1280x720       60.0  
   1024x768       75.1     60.0  
   832x624        74.6  
   800x600        75.0     60.3  
   640x480        75.0     60.0  
   720x400        70.1  
HDMI2 disconnected (normal left inverted right x axis y axis)
VIRTUAL1 disconnected (normal left inverted right x axis y axis)
login
  • 1 个回答
  • 1935 Views
Martin Hope
k0pernikus
Asked: 2016-01-12 08:15:20 +0800 CST

即使应该已导入,如何修复丢失的 gpg 密钥?

  • 5

正如这里指出的那样,我正在改变我在一堆机器上安装 docker 的方式。它在一个上运行良好,但是这个行为很奇怪。

我已经导入了密钥:

sudo apt-key adv --keyserver hkp://pgp.mit.edu:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
Executing: gpg --ignore-time-conflict --no-options --no-default-keyring --homedir /tmp/tmp.uUGtmucAUd --no-auto-check-trustdb --trust-model always --keyring /etc/apt/trusted.gpg --primary-keyring /etc/apt/trusted.gpg --keyring /etc/apt/trusted.gpg.d/atareao-telegram.gpg --keyring /etc/apt/trusted.gpg.d/neovim-ppa-unstable.gpg --keyring /etc/apt/trusted.gpg.d/nilarimogard-webupd8.gpg --keyring /etc/apt/trusted.gpg.d/ondrej-php-7_0.gpg --keyring /etc/apt/trusted.gpg.d/shutter-ppa.gpg --keyring /etc/apt/trusted.gpg.d/trustdb.gpg --keyring /etc/apt/trusted.gpg.d/trusted.gpg --keyring /etc/apt/trusted.gpg.d/vincent-c-ponysay.gpg --keyring /etc/apt/trusted.gpg.d/webupd8team-y-ppa-manager.gpg --keyring /etc/apt/trusted.gpg.d/xorg-edgers-ppa.gpg --keyserver hkp://pgp.mit.edu:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
gpg: requesting key 2C52609D from hkp server pgp.mit.edu
gpg: [don't know]: invalid packet (ctb=01)
gpg: keydb_get_keyblock failed: eof
gpg: key 2C52609D: public key "Docker Release Tool (releasedocker) <[email protected]>" imported
gpg: Total number processed: 1
gpg:               imported: 1  (RSA: 1)

但仍然sudo apt-get update因缺少密钥而失败:

w: GPG error: https://apt.dockerproject.org ubuntu-trusty Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY F76221572C52609D

我错过了什么?

我也尝试了当前提供的答案,但是在删除trusted.gpg 文件后,我无法添加密钥

root@fluttershy:/etc/apt# rm trusted.gpg
root@fluttershy:/etc/apt# apt-key update
gpg: [don't know]: invalid packet (ctb=01)
gpg: keydb_get_keyblock failed: eof
gpg: key 437D05B5: public key "Ubuntu Archive Automatic Signing Key <[email protected]>" imported
gpg: [don't know]: invalid packet (ctb=01)
gpg: keydb_get_keyblock failed: eof
gpg: key FBB75451: public key "Ubuntu CD Image Automatic Signing Key <[email protected]>" imported
gpg: [don't know]: invalid packet (ctb=01)
gpg: keydb_get_keyblock failed: eof
gpg: key C0B21F32: public key "Ubuntu Archive Automatic Signing Key (2012) <[email protected]>" imported
gpg: [don't know]: invalid packet (ctb=01)
gpg: keydb_get_keyblock failed: eof
gpg: key EFE21092: public key "Ubuntu CD Image Automatic Signing Key (2012) <[email protected]>" imported
gpg: Total number processed: 4
gpg:               imported: 4  (RSA: 2)
root@fluttershy:/etc/apt#
apt
  • 2 个回答
  • 26135 Views
Martin Hope
k0pernikus
Asked: 2015-11-06 04:35:52 +0800 CST

如何在不使用鼠标的情况下通过键盘选择要在 Chrome 中复制和粘贴的文本?

  • 18

我在我的谷歌浏览器中打开了一些在线教程。它告诉我在终端中运行一些命令。

我目前的工作流程是通过鼠标选择必要的部分,然后通过在终端中单击鼠标中键插入复制的文本。

我想避免在大多数情况下使用鼠标,所以我想只使用键盘来突出显示网页上的文本。我希望将文本自动保存到类似于鼠标选择的缓冲区中,但即使这样也可以在不使用鼠标选择文本的情况下按 ctr+c 就可以了。

Chrome 中是否有用于该目的的模式?

keyboard
  • 4 个回答
  • 18740 Views
Martin Hope
k0pernikus
Asked: 2015-11-03 09:10:17 +0800 CST

如何在 grub 菜单进行全盘加密安装后修复不工作的 USB(键盘、鼠标)?

  • 1

我在 Dell E5450 上新安装了 Ubuntu 14.04。硬盘在安装时已完全加密。

笔记本电脑的键盘工作正常,但在尝试外接 USB 键盘和鼠标时遇到问题。他们只是不会通过 grub 菜单工作。

(我什至觉得 USB 在 grub 后根本无法工作。)

这不是硬件问题,因为 Live Stick 可以在键盘和鼠标支持下启动。

然而,一旦我必须输入密码来解锁加密的硬盘,我就无法输入,甚至在 Ubuntu 本身也无法识别。

我调查了这个问题并发现了错误报告,但所提供的解决方法似乎都不适合我。

我尝试将这些添加到我的模块列表中:

$ cat /etc/initramfs-tools/modules
# List of modules that you want to include in your initramfs.
# They will be loaded at boot time in the order below.
#
# Syntax:  module_name [args ...]
#
# You must run update-initramfs(8) to effect this change.
#
# Examples:
#
# raid1
# sd_mod

hid
usbhid
hid_generic
ohci_pci

和运行

sudo update-initramfs -u

然而没有运气。

如何使用全盘加密为 Ubuntu14.04 修复我的 USB?

14.04
  • 1 个回答
  • 2117 Views
Martin Hope
k0pernikus
Asked: 2015-06-05 01:26:31 +0800 CST

如何在 Gnome Shell 的工作区预览中同时拥有两个显示器?

  • 8

对于我的 Gnome Shell,我已禁用工作区应仅在主显示器上。所以现在,每当我切换工作区时,两​​个显示器都会按应有的方式切换它们的内容。

然而,当我按下Meta以预览我的工作区时,我所看到的只是主显示器工作区内容的预览。

这使得在我的工作空间中导航变得非常困难,因为我必须知道某个窗口隐藏在哪个辅助监视器上。

如何在预览中预览所有显示器的内容?

14.04
  • 1 个回答
  • 3368 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