无法找到软件包openfoam221


-1

当我执行命令时

**VERS=$(lsb_release -cs)
sudo sh -c "echo deb http://www.openfoam.org/download/ubuntu $VERS main > /etc/apt**/sources.list.d/openfoam.list"*][1]* 

我有一个文件,openfoam.list 但输出sudo apt-get install openfoam221

N: Ignoring file 'openfoam221_0-1_i386.deb' in directory '/etc/apt/sources.list.d/' as it has an invalid filename extension
N: Ignoring file 'openfoamlist' in directory '/etc/apt/sources.list.d/' as it has no filename extension
N: Ignoring file 'openfoam221_0-1_i386.deb' in directory '/etc/apt/sources.list.d/' as it has an invalid filename extension
N: Ignoring file 'openfoamlist' in directory '/etc/apt/sources.list.d/' as it has no filename extension
N: Ignoring file 'openfoam221_0-1_i386.deb' in directory '/etc/apt/sources.list.d/' as it has an invalid filename extension
N: Ignoring file 'openfoamlist' in directory '/etc/apt/sources.list.d/' as it has no filename extension
E: Unable to locate package openfoam221

图片


1
为什么在source.list.d中有一个deb文件和一个文件?
Braiam 2013年

Answers:


1

好的,我真的很希望您能解释一下您要做什么,但是让我们清理一下混乱的情况:

sudo rm /etc/apt/sources.list.d/openfoam*

现在,我假设您在某个地方输入了错误的东西,这是如何完成的:

sudo sh -c "echo deb http://www.openfoam.org/download/ubuntu $(lsb_release -cs) main > /etc/apt/sources.list.d/openfoam.list"

现在,使用cat以下命令检查文件:

braiam@bt:~$ cat /etc/apt/sources.list.d/openfoam.list 
deb http://www.openfoam.org/download/ubuntu raring main

现在一切正常,您可以更新和安装所需的任何东西。

sudo apt-get update
sudo apt-get install openfoam221
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.