Проблема с зависимостью произошла при установке факела на Ubuntu 16.04 - PullRequest
0 голосов
/ 27 марта 2019

Я устанавливаю модель на моем сервере Ubuntu 16.04.Я скачал и установил факел в соответствии с официальной веб-страницей (http://torch.ch/docs/getting-started.html),, но когда я выполнил команду bash install-deps, возникла проблема зависимости.

(py3) root@boltzmann:/home/ubuntu/torch# bash install-deps
Hit:1 http://mirrors.aliyun.com/ubuntu xenial InRelease                                                                                       
Hit:2 http://mirrors.aliyun.com/ubuntu xenial-updates InRelease                                                                                   
Hit:3 http://mirrors.aliyun.com/ubuntu xenial-backports InRelease                                                                                 
Hit:4 http://mirrors.aliyun.com/ubuntu xenial-security InRelease                                                                                  
Get:5 http://security.ubuntu.com/ubuntu bionic-security InRelease [88.7 kB]                                                                       
Get:6 http://archive.ubuntu.com/ubuntu bionic-updates InRelease [88.7 kB]                                                        
Hit:7 http://ppa.launchpad.net/jonathonf/python-3.6/ubuntu bionic InRelease                           
Hit:8 http://ppa.launchpad.net/webupd8team/java/ubuntu bionic InRelease                                         
Get:9 http://archive.ubuntu.com/ubuntu bionic-backports InRelease [74.6 kB]
Get:10 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 Packages [558 kB]
Get:11 http://archive.ubuntu.com/ubuntu bionic-updates/universe amd64 Packages [746 kB]                                                           
Fetched 1,556 kB in 19s (78.5 kB/s)                                                                                                               
Reading package lists... Done
Updated successfully.
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 python-software-properties : Depends: python-apt (>= 0.6.20ubuntu16) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

Я попытался решить проблему с помощьюGoogle, и обнаружил, что две проблемы были похожи с моей, один использует команду следующим образом,

sudo apt-get clean; apt-get update --fix-missing

другой , чтобы изменить имя пакета с python-software-properties до python3-software-properties в строке 178 и строке 261 в файле install-deps, очевидно, он снова не работал.

(py3) root@boltzmann:/home/ubuntu/torch# bash install-deps
Get:1 http://security.ubuntu.com/ubuntu bionic-security InRelease [88.7 kB]                                                                   
Hit:2 http://mirrors.aliyun.com/ubuntu xenial InRelease                                                                                           
Hit:3 http://mirrors.aliyun.com/ubuntu xenial-updates InRelease                                                                                   
Hit:4 http://mirrors.aliyun.com/ubuntu xenial-backports InRelease                                                                                 
Hit:5 http://mirrors.aliyun.com/ubuntu xenial-security InRelease                                                                                  
Hit:6 http://ppa.launchpad.net/jonathonf/python-3.6/ubuntu bionic InRelease                                                                       
Hit:7 http://ppa.launchpad.net/webupd8team/java/ubuntu bionic InRelease                                                                           
Get:8 http://archive.ubuntu.com/ubuntu bionic-updates InRelease [88.7 kB]                                                                         
Get:9 http://archive.ubuntu.com/ubuntu bionic-backports InRelease [74.6 kB]                                                                       
Fetched 252 kB in 17s (14.3 kB/s)                                                                                                                 
Reading package lists... Done
Updated successfully.
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 python3-software-properties : Depends: gpg but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

И я попытался установить gpd с помощью apt-get,но все же,

(py3) root@boltzmann:/home/ubuntu/torch# apt-get install gpg
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 gpg : Depends: gpgconf (= 2.2.4-1ubuntu1.2) but it is not going to be installed
       Depends: libgcrypt20 (>= 1.8.0) but 1.6.5-2ubuntu0.5 is to be installed
       Depends: libreadline7 (>= 6.0) but it is not installable
       Breaks: gnupg (< 2.1.21-4) but 1.4.20-1ubuntu3.3 is to be installed
       Recommends: gnupg (= 2.2.4-1ubuntu1.2) but 1.4.20-1ubuntu3.3 is to be installed
E: Unable to correct problems, you have held broken packages.

Это не способ всегда устанавливать недостающие зависимости, поэтому я надеюсь, что смогу найти решение здесь с вашей помощью. Спасибо.

...