虚拟机安装OpenFOAM-v2012遇到问题(Unable to locate package)
-
虚拟机的信息是:
LSB Version: core-11.1.0ubuntu2-noarch:security-11.1.0ubuntu2-noarch Distributor ID: Ubuntu Description: Ubuntu 20.10 Release: 20.10 Codename: groovy
按照https://www.openfoam.com/download/openfoam-installation-from-source的步骤来安装,首先需要按照https://www.openfoam.com/documentation/system-requirements安装一些系统软件,第一部分如下:
sudo apt-get update sudo apt-get install build-essential flex bison cmake zlib1g-dev libboost-system-dev libboost-thread-dev libopenmpi-dev openmpi-bin gnuplot libreadline-dev libncurses-dev libxt-dev sudo apt-get install qt4-dev-tools libqt4-dev libqt4-opengl-dev freeglut3-dev libqtwebkit-dev
执行第三行命令时出现错误:
Reading package lists... Done Building dependency tree Reading state information... Done Package libqt4-dev 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 E: Unable to locate package qt4-dev-tools E: Package 'libqt4-dev' has no installation candidate E: Unable to locate package libqt4-opengl-dev E: Unable to locate package libqtwebkit-dev
网上的说法是要换国内的源,所以按照https://blog.csdn.net/qq_42824983/article/details/110236257更换为阿里源,但是问题仍然存在,而且sudo apt-get upgrade后还有三百多个not upgraded,于是来论坛请教。
还有个小问题,刚才那个教程里的get-apt update以及apt-get upgrade无法被执行,在前面加sudo就行了,不知道是作者漏写了还是其它原因?
感谢各位老师和前辈!