无法找到包 openfoam221

无法找到包 openfoam221

当我执行命令时

**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

好的,我真的很想让你解释一下你想做什么,但是让我们来清理一下混乱:

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

相关内容