ubuntu18.04安装torch 遇到的几个Error处理

博客记录了Torch安装过程中遇到的问题及解决办法。安装Torch时,遇到‘python-software-properties’无安装候选的错误,将相关安装命令替换后解决;继续安装时用‘--fix-broken’解决相关问题。安装image和nn库时,通过修改git配置解决克隆仓库失败问题。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

首先参考官网的命令在终端输入

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

cd ~/torch; bash install-deps;

之前都没有问题,之后得到如下错误:

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

解决办法:

用vim 打开 install-deps文件

将sudo apt-get install python-software-properties替换成

sudo apt-get install -y software-properties-common之后保存。

继续参照官网安装遇到一个错误fix 相关问题

在终端中输入sudo apt --fix-broken install python-pycurl python-apt

最后安装完成。

使用luarocks install命令安装image,nn 遇到下列错误

fatal: read error: Connection reset by peer

Error: Failed cloning git repository.
解决方法:

终端输入:git config --global url."https://".insteadOf git://
 

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值