未找到版本“GLIBC_2.28”

Amm*_*eda 5 glibc libc armv7 ubuntu-16.04 pytorch

我正在尝试在 ARMv7(32 位)架构上安装 PyTorch,但 PyTorch 没有官方的 ARMv7 版本,所以我尝试了这个非官方版本

它安装成功但是当我导入手电筒时出现以下错误

>>import torch
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python3.7/site-packages/torch/__init__.py", line 81, in <module>
    from torch._C import *
ImportError: /lib/arm-linux-gnueabihf/libc.so.6: version `GLIBC_2.28' not found (required by /usr/local/lib/python3.7/site-packages/torch/lib/libtorch_python.so)
Run Code Online (Sandbox Code Playgroud)

我尝试了以下

sudo apt-get update
sudo apt-get install libc6
Run Code Online (Sandbox Code Playgroud)

但它接缝就像我有最新版本的 libc6

Reading package lists... Done
Building dependency tree       
Reading state information... Done
libc6 is already the newest version (2.23-0ubuntu11).
The following packages were automatically installed and are no longer required:
  busybox-initramfs cpio initramfs-tools initramfs-tools-bin initramfs-tools-core klibc-utils libdbusmenu-gtk4 libklibc
  libllvm3.8 libmircommon5 linux-base
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 10 not upgraded.
Run Code Online (Sandbox Code Playgroud)

这是我拥有的 GLIBCXX 和 GLIBC 版本:

strings /usr/lib/arm-linux-gnueabihf/libstdc++.so.6 | grep GLIBC
GLIBCXX_3.4
GLIBCXX_3.4.1
GLIBCXX_3.4.2
GLIBCXX_3.4.3
GLIBCXX_3.4.4
GLIBCXX_3.4.5
GLIBCXX_3.4.6
GLIBCXX_3.4.7
GLIBCXX_3.4.8
GLIBCXX_3.4.9
GLIBCXX_3.4.10
GLIBCXX_3.4.11
GLIBCXX_3.4.12
GLIBCXX_3.4.13
GLIBCXX_3.4.14
GLIBCXX_3.4.15
GLIBCXX_3.4.16
GLIBCXX_3.4.17
GLIBCXX_3.4.18
GLIBCXX_3.4.19
GLIBCXX_3.4.20
GLIBCXX_3.4.21
GLIBCXX_3.4.22
GLIBCXX_3.4.23
GLIBCXX_3.4.24
GLIBCXX_3.4.25
GLIBCXX_3.4.26
GLIBCXX_3.4.27
GLIBCXX_3.4.28
GLIBC_2.4
GLIBC_2.6
GLIBC_2.18
GLIBC_2.16
GLIBC_2.17
Run Code Online (Sandbox Code Playgroud)

ldd版本:

ldd --version

ldd (Ubuntu GLIBC 2.23-0ubuntu11) 2.23
Copyright (C) 2016 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Written by Roland McGrath and Ulrich Drepper.
Run Code Online (Sandbox Code Playgroud)

我的操作系统:

cat /etc/os-release
NAME="Ubuntu"
VERSION="16.04.6 LTS (Xenial Xerus)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 16.04.6 LTS"
VERSION_ID="16.04"
HOME_URL="http://www.ubuntu.com/"
SUPPORT_URL="http://help.ubuntu.com/"
BUG_REPORT_URL="http://bugs.launchpad.net/ubuntu/"
VERSION_CODENAME=xenial
UBUNTU_CODENAME=xenial
Run Code Online (Sandbox Code Playgroud)

那么可以在我的机器上安装 GLIBC_2.28 吗?

Emp*_*ian 11

那么可以在我的机器上安装 GLIBC_2.28 吗?

这是可能的,但是您犯错误并使系统无法启动的可能性非常高。这样做也很可能会破坏您系统上的其他内容(这就是发行版通常不会从最初附带的版本更新 GLIBC 版本的原因)。

更好的解决方案是针对您的系统构建 PyTorch(即使用您的“普通”工具链)。

PS GLIBCXX与您的问题无关,只是为您的问题增加噪音。

  • 我安装了 GLIBC_2.28,搞砸了我的系统。好答案 (27认同)
  • 我正要犯同样的错误......幸运的是我! (4认同)

小智 5

对于 AWS 中使用无服务器框架的任何人,我遇到了 python Eve (flask, bcrypt) (python 3.8) 的问题,将此软件包及其版本添加到requirements.txt

密码学==3.4.8 bcrypt==3.2.2