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

Thanasis Mattas's questions

Martin Hope
Thanasis Mattas
Asked: 2025-03-07 23:51:00 +0800 CST

snap 找不到 libxcb.so.1

  • 6
$ snap list
snap: error while loading shared libraries: libxcb.so.1: cannot open shared object file: No such file or directory
$ whereis libxcb.so.1
libxcb.so.1: /usr/lib/x86_64-linux-gnu/libxcb.so.1
$ which snap
/usr/bin/snap
$ sha256sum /bin/snap
06d498c41a5bf2f4d836fb50ff02749c82297fd3e74e41d78bb089292158be5a  /bin/snap
$ file /bin/snap
/bin/snap: ELF 64-bit LSB pie executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, Go BuildID=_XiLSmroeRJA5Uo8zvaX/rt3gXAZzIqOiI-Q_dmRd/7eHWjLhhkgUrQ7Kb9WkR/V-DYZbbtce--vU_MTNt2, stripped
$ strace -o trace.out /usr/bin/snap list
$ grep -C5 'libxcb.so.1' trace.out
mmap(NULL, 1297704, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7fee906c3000
mmap(0x7fee906dc000, 589824, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x19000) = 0x7fee906dc000
mmap(0x7fee9076c000, 585728, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xa9000) = 0x7fee9076c000
mmap(0x7fee907fb000, 20480, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x138000) = 0x7fee907fb000
close(3)                                = 0
openat(AT_FDCWD, "/usr/lib/cuda/include/libxcb.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/cuda/lib64/libxcb.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/local/lib/libxcb.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "glibc-hwcaps/x86-64-v3/libxcb.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "glibc-hwcaps/x86-64-v2/libxcb.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "libxcb.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libxcb.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0644, st_size=170600, ...}) = 0
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fee90b5b000
mmap(NULL, 172680, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7fee90b30000
mmap(0x7fee90b3c000, 81920, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xc000) = 0x7fee90b3c000
--
mmap(NULL, 1297704, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7bdda3e93000
mmap(0x7bdda3eac000, 589824, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x19000) = 0x7bdda3eac000
mmap(0x7bdda3f3c000, 585728, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xa9000) = 0x7bdda3f3c000
mmap(0x7bdda3fcb000, 20480, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x138000) = 0x7bdda3fcb000
close(3)                                = 0
openat(AT_FDCWD, "/snap/snapd/current/usr/lib/x86_64-linux-gnu/libxcb.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/libxcb.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/snap/snapd/current/usr/lib/glibc-hwcaps/x86-64-v3/libxcb.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/snap/snapd/current/usr/lib/glibc-hwcaps/x86-64-v3", 0x7ffc475173a0, 0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/snap/snapd/current/usr/lib/glibc-hwcaps/x86-64-v2/libxcb.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/snap/snapd/current/usr/lib/glibc-hwcaps/x86-64-v2", 0x7ffc475173a0, 0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/snap/snapd/current/usr/lib/tls/haswell/x86_64/libxcb.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/snap/snapd/current/usr/lib/tls/haswell/x86_64", 0x7ffc475173a0, 0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/snap/snapd/current/usr/lib/tls/haswell/libxcb.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/snap/snapd/current/usr/lib/tls/haswell", 0x7ffc475173a0, 0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/snap/snapd/current/usr/lib/tls/x86_64/libxcb.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/snap/snapd/current/usr/lib/tls/x86_64", 0x7ffc475173a0, 0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/snap/snapd/current/usr/lib/tls/libxcb.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/snap/snapd/current/usr/lib/tls", 0x7ffc475173a0, 0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/snap/snapd/current/usr/lib/haswell/x86_64/libxcb.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/snap/snapd/current/usr/lib/haswell/x86_64", 0x7ffc475173a0, 0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/snap/snapd/current/usr/lib/haswell/libxcb.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/snap/snapd/current/usr/lib/haswell", 0x7ffc475173a0, 0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/snap/snapd/current/usr/lib/x86_64/libxcb.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/snap/snapd/current/usr/lib/x86_64", 0x7ffc475173a0, 0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/snap/snapd/current/usr/lib/libxcb.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/snap/snapd/current/usr/lib", {st_mode=S_IFDIR|0755, st_size=130, ...}, 0) = 0
writev(2, [{iov_base="/usr/bin/snap", iov_len=13}, {iov_base=": ", iov_len=2}, {iov_base="error while loading shared libra"..., iov_len=36}, {iov_base=": ", iov_len=2}, {iov_base="libxcb.so.1", iov_len=11}, {iov_base=": ", iov_len=2}, {iov_base="cannot open shared object file", iov_len=30}, {iov_base=": ", iov_len=2}, {iov_base="No such file or directory", iov_len=25}, {iov_base="\n", iov_len=1}], 10) = 124
exit_group(127)                         = ?
+++ exited with 127 +++


已经尝试重新安装:

sudo apt install --reinstall snapd && sudo snap refresh

但无济于事。

Ubuntu 24.10

有什么想法吗?

snap
  • 1 个回答
  • 138 Views
Martin Hope
Thanasis Mattas
Asked: 2019-08-09 07:11:26 +0800 CST

无法使用 pip (ubuntu) [pip 配置了需要 TLS/SSL 的位置,但是 Python 中的 ssl 模块不可用。]

  • 11
$ sudo pip install numpy    # or anything else

错误:

The directory '/home/user/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag. (tried sudo -H, the rest errors persist)  
pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.    
Collecting numpy  
  Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /simple/numpy/  
pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.  
Could not fetch URL https://pypi.org/simple/pip/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/pip/ (Caused by SSLError("Can't connect to HTTPS URL because the SSL module is not available.")) - skipping  
$ python -V
Python 3.7.3  
$ pip -V
pip 19.0.3 from /usr/local/lib/python3.7/site-packages/pip (python 3.7)
$ whereis pip
pip: /usr/local/bin/pip2.7 /usr/local/bin/pip3.7 /usr/local/bin/pip /usr/local/bin/pip3.6  

pip3.6 出现在:

$ sudo su
$ update-alternatives --install /usr/bin/python python /usr/bin/python3 1

在 anaconda 环境中,pip 工作正常。

以安全的方式删除与 python 相关的东西——不破坏系统,并正确地重新安装东西,是一个更可取的解决方案吗?以及如何做到这一点?

我知道有很多类似的问题,但是我尝试了很多东西(显然,我搞砸了一些东西)并且我没有解决问题。

谢谢!

python3 pip
  • 1 个回答
  • 43805 Views
Martin Hope
Thanasis Mattas
Asked: 2019-04-04 03:34:25 +0800 CST

第二个硬盘的读/写权限

  • 0

我知道以前有人问过这个问题,但似乎没有任何效果。我在 NVME 上有一个双启动 Windows 10 - ubuntu 18.10 和第二个 1 TB 硬盘驱动器 (ntfs)。Windows 当然对 HDD 有权限,但 ubuntu 没有(只读)。

我想在 HDD 上以用户 (id=1000) 的身份拥有读写执行权限!

试过:

  1. 重新安装

    sudo mount -o remount,rw 有时在第一次重启后有效,但在第二次重启后,我又获得了只读权限

  2. 编辑 fstab

默认条目:

/dev/disk/by-uuid/[disk-id] /path/to/mount auto nosuid,nodev,nofail,x-gvfs-show 0 0

变成:

/dev/disk/by-uuid/[disk-id] /path/to/mount auto nosuid,rw,nodev,nofail,x-gvfs-show 0 0

,

/dev/disk/by-uuid/[disk-id] /path/to/mount auto nosuid,uid=1000,nodev,rw,nofail,x-gvfs-show

,

/dev/disk/by-uuid/[disk-id] /path/to/mount ntfs 默认值

,

/dev/disk/by-uuid/[disk-id] /path/to/mount ntfs-3g 默认值

,

dev/disk/by-uuid/[disk-id] /path/to/mount ntfs nosuid,uid=1000,nodev,rw,nofail,x-gvfs-show 0 0

  1. chown

    sudo chown -R -v 用户:用户 /path/to/mount

错误:未能将 '/path/to/mount' 的所有权从 user:root 更改为 user:user ,

chown -R user /path/to/mount

没用

据我了解,权限是在启动时挂载时授予的。因此,解决方案必须在于 fstab。但是,挂载点在 /media/(或默认在 /mnt/),这是只有 root 权限的目录,因此我尝试在 /home/user/testDir 下挂载,但出现错误:

mount: /home/user/testDir: 挂载点未挂载或错误选项

有什么建议么?也许,如何正确编辑 fstab?任何帮助将不胜感激。

fstab permissions partitioning mount hard-drive
  • 1 个回答
  • 917 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