安装 torch 时“python-software-properties”没有安装候选

安装 torch 时“python-software-properties”没有安装候选

我正在使用 Ubuntu 并且想要安装 Torch。我正在跟进本指南

第一行运行良好:

git clone https://github.com/torch/distro.git ~/torch --recursive

但失败了

cd ~/torch; bash install-deps;

Ign:1 cdrom://Ubuntu 16.04 LTS _Xenial Xerus_ - Release amd64 (20160420.1) xenial InRelease
Hit:2 cdrom://Ubuntu 16.04 LTS _Xenial Xerus_ - Release amd64 (20160420.1) xenial Release
Get:4 htt p://security.ubuntu. com/ubuntu xenial-security InRelease [94.5 kB]    
Hit:5 htt p://archive.ubuntu. com/ubuntu xenial InRelease                        
Get:6 htt p://archive.ubuntu. com/ubuntu xenial-updates InRelease [94.5 kB]      
Fetched 189 kB in 0s (355 kB/s)                                      
Reading package lists... Done
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Package python-software-properties is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
However the following packages replace it:
  software-properties-common

E: Package 'python-software-properties' has no installation candidate

(Had to add spaces to the links because I don't have enough rep)

**dpkg -L python-software-properties | xargs ls -d > /dev/null** yields

dpkg-query: package 'python-software-properties' is not installed
Use dpkg --info (= dpkg-deb --info) to examine archive files,
and dpkg --contents (= dpkg-deb --contents) to list their contents.

此命令给出相同的错误消息:

sudo apt-get install --reinstall python-software-properties

我运行sudo apt-get install software-properties-common并安装得很好,但我仍然遇到同样的错误。

我正在通过 USB 运行最新版本的 Ubuntu,64 位

答案1

问题出在脚本中install-deps

请将第 139 行替换为以下命令。

sudo apt-get install -y software-properties-common

答案2

1.后藤

Home -> Torch -> Open install-deps

找到关键词python 软件属性并将其替换为软件-python-common, 保存并退出。

2.使用命令安装软件-python-common

sudo apt-get install software-properties-common 

3.运行命令

cd ~/torch; bash install-deps;

答案3

sudo apt install --reinstall python3-debian python3-chardet

会工作得很好;)

相关内容