您好,欢迎来到好走旅游网。
搜索
您的当前位置:首页OpenFoam安装报错:E: Unable to locate package openfoam6

OpenFoam安装报错:E: Unable to locate package openfoam6

来源:好走旅游网

报错

在使用Ubuntu18.04安装OpenFoam-6时,按照安装时(非源码编译),输入sudo apt-get -y install openfoam6时报错:

runner@ubuntu:/opt$ sudo apt-get -y install openfoam6
[sudo] password for runner: 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Unable to locate package openfoam6

解决方案

20220906测试阿里云源可用,故使用阿里云源。

sudo gedit /etc/apt/sources.list
  1. 在打开的文件中第一行插入下面内容,随后保存并关闭。
deb http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse

deb http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse

deb http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse

deb http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse

deb http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse

sudo apt-get update
sudo apt-get upgrade
  1. 随后重新执行命令即可(先前执行过的依然要执行)
sudo sh -c "wget -O - https://dl.openfoam.org/gpg.key | apt-key add -"
sudo add-apt-repository http://dl.openfoam.org/ubuntu
sudo apt-get update
sudo apt-get -y install openfoam6

安装过程中其他问题请参阅

因篇幅问题不能全部显示,请点此查看更多更全内容

Copyright © 2019- haog.cn 版权所有

违法及侵权请联系:TEL:199 1889 7713 E-MAIL:2724546146@qq.com

本站由北京市万商天勤律师事务所王兴未律师提供法律服务