Неподдерживаемая версия GNU! версии gcc позже, чем 6 не поддерживаются! - вызывает импорт cpp_extension

Затем я импортирую его, говорит перед ошибкой это:

/home/dex/anaconda3/lib/python3.6/site-packages/torch/utils/cpp_extension.py:118: UserWarning: 

                               !! WARNING !!

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Your compiler (c++) may be ABI-incompatible with PyTorch!
Please use a compiler that is ABI-compatible with GCC 4.9 and above.
See https://gcc.gnu.org/onlinedocs/libstdc++/manual/abi.html.

See https://gist.github.com/goldsborough/d466f43e8ffc948ff92de7486c5216d6
for instructions on how to install GCC 4.9 or higher.
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

                              !! WARNING !!

  warnings.warn(ABI_INCOMPATIBILITY_WARNING.format(compiler))

Но следующая суть, пытающаяся устанавливать 4.9 и 5.9 тех же ошибочных Наклонов, установлена, также на 18,04, но с другой ошибкой:

dex@dexpc:~$ sudo apt-get install software-properties-common
[sudo] password for dex: 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
software-properties-common is already the newest version (0.96.24.32.4).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
dex@dexpc:~$ sudo add-apt-repository ppa:ubuntu-toolchain-r/test
WARNING:root:could not open file '/etc/apt/sources.list'

WARNING:root:could not open file '/etc/apt/sources.list'

 Toolchain test builds; see https://wiki.ubuntu.com/ToolChain

 More info: https://launchpad.net/~ubuntu-toolchain-r/+archive/ubuntu/test
Press [ENTER] to continue or Ctrl-c to cancel adding it.

WARNING:root:could not open file '/etc/apt/sources.list'

Ign:1 http://dl.google.com/linux/chrome/deb stable InRelease
Hit:2 http://dl.google.com/linux/chrome/deb stable Release                  
Hit:3 http://ppa.launchpad.net/graphics-drivers/ppa/ubuntu bionic InRelease    
0% [Release.gpg gpgv 1 189 B] [Connected to download.docker.com (52.222.250.2
Hit:5 http://ppa.launchpad.net/teejee2008/ppa/ubuntu bionic InRelease          
Hit:6 https://download.docker.com/linux/ubuntu bionic InRelease          
Hit:7 http://ppa.launchpad.net/ubuntu-toolchain-r/test/ubuntu bionic InRelease
Reading package lists... Done                      
dex@dexpc:~$ 
dex@dexpc:~$ sudo apt-get update
Ign:1 http://dl.google.com/linux/chrome/deb stable InRelease
Hit:2 http://dl.google.com/linux/chrome/deb stable Release                 
Hit:3 http://ppa.launchpad.net/graphics-drivers/ppa/ubuntu bionic InRelease    
Hit:4 https://download.docker.com/linux/ubuntu bionic InRelease                
Hit:6 http://ppa.launchpad.net/teejee2008/ppa/ubuntu bionic InRelease          
Hit:7 http://ppa.launchpad.net/ubuntu-toolchain-r/test/ubuntu bionic InRelease
Reading package lists... Done                      
dex@dexpc:~$ sudo apt-get install gcc-5.9 g++-5.9
Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Unable to locate package gcc-5.9
E: Couldn't find any package by glob 'gcc-5.9'
E: Couldn't find any package by regex 'gcc-5.9'
E: Unable to locate package g++-5.9
E: Couldn't find any package by glob 'g++-5.9'
E: Couldn't find any package by regex 'g++-5.9'

dex@dexpc:~ $ gcc - версия gcc (7.3.0-16ubuntu3 Ubuntu) 7.3.0

1
задан 10 September 2018 в 22:36

1 ответ

Должна быть копия sources.list в Копии/usr/share/doc/apt/examples/sources.list, Ваш/etc/apt/sources.list для сохранения ppa изменяет Вас вводимый, и запустите с новой копии. Затем работайте

sudo apt-get update
sudo apt-get dist-upgrade

Затем добавьте в своем ppas из Вашей сохраненной копии исходного списка и повторитесь

sudo apt-get update
sudo apt-get dist-upgrade  

На всякий случай вот содержание нового файла:

# See sources.list(5) manpage for more information
# Remember that CD-ROMs, DVDs and such are managed through the apt-cdrom tool.
deb http://us.archive.ubuntu.com/ubuntu xenial main restricted
deb-src http://us.archive.ubuntu.com/ubuntu xenial main restricted

deb http://security.ubuntu.com/ubuntu xenial-security main restricted
deb-src http://security.ubuntu.com/ubuntu xenial-security main restricted

deb http://us.archive.ubuntu.com/ubuntu xenial-updates main restricted
deb-src http://us.archive.ubuntu.com/ubuntu xenial-updates main restricted
1
ответ дан 7 December 2019 в 15:14

Другие вопросы по тегам:

Похожие вопросы: