1. MacOS OMNeT++安装过程及问题
按照install guide,把omnetpp放到Home路径下,即/Users/xxxx下,记得修改bashrc里面的path路径。安装成功,正常运行。
关闭应用后,再次打开,遇到warning:
File dose not exist, ignoring: /Users/xxxx/.eclipse_keyring
运行程序会报image环境的错。(师妹说,在ubuntu下换成openjdk可解决。)
尝试:
$ cd /Users/xxxx
$ touch .eclipse_keyring
打开软件会报错:
Error: Cannot create a project to cover directory /Users/xxxx because it contains the workspace location /Users/xxxx/omnetpp-5.1.1. Projects directories must not contain the workspace where adminstrative information is stored about them.
Please choose File->Switch Workspace from the menu, and select another workspace location.
运行程序,报错(image 。。。):
This application failed to start because it could not find or load the Qt platform plugin "cocoa"
in "".
Reinstalling the application may fix this problem.
Simulation terminated with exit code: 134
Working directory: /Users/xxxx/omnetpp-5.1.1/samples/routing
Command line: routing -m omnetpp.ini
Environment variables:
PATH=/Users/xxxx/omnetpp-5.1.1/bin:;;:/usr/bin:/bin:/usr/sbin:/sbin
DYLD_LIBRARY_PATH=/Users/xxxx/omnetpp-5.1.1/lib::
OMNETPP_IMAGE_PATH=/Users/xxxx/omnetpp-5.1.1/images
尝试:
$ pip3 install opencv-python-headless
还是会报workspace和Qt的错。
重新安装Qt:
$ brew install qt
$ brew cask install qt-creator
bashrc里添加export PATH="/usr/local/opt/qt/bin:$PATH"' >> /Users/xxxx/.bash_profile,不work。
总是有错。
暂时解决方案:
Every time, start the IDE from the command line (after executing . setenv
) by typing:
$ cd Users/xxxx/omnetpp-5.1.1/
$ . setenv
$ omnetpp
Do not start the IDE from the Finder. The reason is that the IDE requires some environment variables that are set in the setenv
script and those are not present when it is started from Finder. Additionally, macOS quarantines all graphical apps that were downloaded from the internet (including the IDE). This means that when you start the .app file, you seem to be running it from the installation folder, but in fact macOS remaps it to a temporary volume with random name, which breaks the whole IDE as it cannot find the OMNET rood directory. This is worked around in the the omnetpp
scripts (in OMNETPP_ROOT/ide) but that is not executed if you start directly from the finder.