Error during installation of omnetpp on MAC(5.6.1) - installation

I found couple of answers but none of them was helpful, I downloaded omnetpp for MAC (omnetpp-5.6.1-src-macosx.tar) if i open the IDE directly I get "“Omnetpp” is damaged and can’t be opened." I tried installing it like 5 times. I found that I should execute setenv, I got this error "Error: not a login shell -- run this script as 'source setenv' or '. setenv'"
Can someone please help me with the steps to install/use omnetpp? Thank you so much in advance.

As the error message suggests:
first open a terminal window
change to the omnetpp installation directory i.e. cd ~/omnetpp-5.6.1 or similar.
source setenv
./configure
make -j4
omnetpp

You have to put the "omnetpp-5.6.1" directory right in the home path: i.e. ~/Users/yourname
Open the "doc" directory in "omnetpp-5.6.1" directory and there you can see an installation guide which helps you what to do step by step.
Do the instruction. be careful writing the command ./configure it may not work. If it doesn't you should use ./configure WITH_TKENV=no WITH_QTENV=no instead of that.
Also before you run $ make command in terminal you have to run $ . setenv .
I did the instruction but I couldn't run the software yet, then I noticed that the problem is my java version!
write:
$java -version
in your terminal it will show you the actual version your system is using, It must be java8 for running this software if it's not, try to downgrade or upgrade it to java8
I hope it helps you! GL!

Related

Why Ocaml version located on file (4.04.0) different from what terminal says (4.03.0)?

I've been trying to run a program that uses graphics (which I've already posted about here). This post and other posts have led me to the conclusion that I need create a ~/.bashrc and put in it:
alias ocaml="/usr/local/Cellar/ocaml/4.03.0/bin/ocaml”
However, /usr/local/Cellar/ocaml/4.03.0/bin/ocaml is not a valid file in my system. B/c when I ran this in the terminal:
$ cd /usr/local/Cellar/ocaml/4.03.0/bin
-bash: cd: /usr/local/Cellar/ocaml/4.03.0/bin: No such file or directory
But changing the version to 4.04.0 works:
$ cd /usr/local/Cellar/ocaml/4.04.0/bin
But when I ask the terminal what ocaml I'm running:
$ which ocaml
/Users/Username/.opam/4.03.0/bin/ocaml
It says I'm running 4.03.0
And my error message when I try to run an ocaml program using graphics is :
Error: Cannot find file /Users/Username/.opam/4.03.0/lib/ocaml/graphics.cma
So it seems like my terminal is running 4.03.0 but I don't have OCaml 4.03.0 in /usr/local/Cellar/ocaml/4.03.0/bin and instead I have 4.04.0??
That to me seems very strange.
If anyone could please help me out that would be greatly appreciated! I have spent hours trying to figure out how to run graphics on my computer and I have no clue why the solutions posted in previous StackOverflow posts are not helping :(
i don't find it strange.
The alias command works only in your terminal, not for the entire system.
Probably you have "/Users/Username/.opam/4.03.0/bin/ocaml" in your PATH variable.
I suggest to do:
export PATH="/usr/local/Cellar/ocaml/4.04.0/bin:$PATH"
then:
which ocaml
and the path should be the 4.04 version
It looks like that you have multiple installations of OCaml on your machine. Some of them being installed via opam, and others either manually, or via system package management. I would suggest just to ignore the latter and focus on opam.
To use opam, you need to activate your switch. This can be done manually,
eval `opam config env`
(Note the use of backticks)
You can also put it in your profile, so that opam will be activated every time you logged in. You can even ask opam to do it for you:
opam config setup --user
Finally, if you want to run a program, out of your normal terminal environment, and do not want to depend on some pre-setup steps (i.e., on a client's machine), then you can use opam config exec:
opam config exec -- ocaml my-ocaml-script.ml

Debugging GO on VSCode using Delve

I want to debug GoLang on VSCode editor. In their documentation they say it is possible. I am following the following Link to install the debugging features on the IDE.
https://marketplace.visualstudio.com/items?itemName=lukehoban.Go
And to install Delve they ask to follow these instructions
https://github.com/derekparker/delve/blob/master/Documentation/installation/windows/install.md
Once installation is completed they ask to run the following code
$ mingw32-make install
But there is an error
mingw32-make: *** No rule to make target 'install'. Stop.
Does anybody know whats wrong with this? Has anything changed other than these instructions?
I managed to get this resolved. You don't want to install mingw for this. Instead run this code and make sure the dlv.exe which is created in any directory which is in your PATH variable in your computer.
$go get -u github.com/derekparker/delve/cmd/dlv
I also did an writeup about debugging Golang using VSCode and Delve. If you are interested you can read it here.
Run mingw32-make install command from directory created by git clone https://github.com/derekparker/delve command.

Issues with Bash and NPM paths

(bash newbie alert)
I'm having a hell of a time getting my dev machine up and running post clean install of 10.10.
I first attempted to install everything via homebrew. After installing Yeoman I was still getting "Yo" command not found errors. I followed these instructions http://d.pr/1hjAi on the Yeoman FAQ however I'm still getting the errors. I then realized I didn't have a .bash_profile, .bashrc or a .profile file in my home directory. I've tried adding just about every path variable I've found on line and nothing seems to fix it. On top of that, adding a path to any of the files mentioned above doesn't seem to update the path.
echo $PATH gives me
/usr/local/share/npm/bin:/usr/local/git/bin:/opt/X11/bin:/usr/local/bin:/sbin:/usr/local/share/npm/bin:/usr/sbin:/usr/local/bin/npm:/bin:/usr/bin:/Library/Frameworks/Python.framework/Versions/Current/bin:~/bin:/usr/local/sbin:/usr/local/bin:/Library/Frameworks/Python.framework/Versions/2.7/bin:/usr/local/share/npm/bin:/usr/local/share/npm/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
Any help would be great.

Building XDebug For Use by MAMP?

I'm using MAMP on Mac OSX Mavericks. I'd like to install the latest XDebug, v2.2.4. Per the XDebug Wizard, I downloaded the XDebug 2.2.4 source. I have many versions of phpize installed on my system - one that is in /usr/bin/, and many others that come with MAMP. MAMP supplies the required phpize for each version of PHP it includes.
Seeking to use the correct phpize, per the XDebug Wizard instructions - http://xdebug.org/docs/faq#custom-phpize - I ran the phpize for PHP 5.5.3 via:
/Applications/MAMP/bin/php/php5.5.3/bin/phpize
..and got this output:
grep: /Applications/MAMP/bin/php/php5.5.3/include/php/main/php.h: No such file or directory
grep: /Applications/MAMP/bin/php/php5.5.3/include/php/Zend/zend_modules.h: No such file or directory
grep: /Applications/MAMP/bin/php/php5.5.3/include/php/Zend/zend_extensions.h: No such file or directory
Configuring for:
PHP Api Version:
Zend Module Api No:
Zend Extension Api No:
Just in case this was not an error (since it appeared that I was following XDebug Wizard directions), I then ran configure via:
./configure --with-php-config=/Applications/MAMP/bin/php/php5.5.3/bin/php-config
...and I ran:
make
...but got this error:
fatal error: 'php.h' file not found
What is the correct way to build XDebug on OSX for use by MAMP?
Thanks very much in advance to all for any thoughts or info.
I had a similar issue and it was resolved after installing XCode and the Command Line Tools for XCode. I already had XCode installed, but I recently moved over to a new machine so I had to open it back up and it updated some things. Then I opened Terminal and ran the command...
xcode-select --install
That popped up a prompt to install the command line tools which I did and it resolved my issue.
Incase anyone else stumbles across this from Google...
My issue was the wrong phpize binary was found on the path.
I was able to resolve this using the Xdebug FAQ, specifically this section: https://xdebug.org/docs/faq#custom-phpize
When Xdebug wizard asks you to run phpize, instead find and run phpize in your MAMP directory. For me, this was:
/Applications/MAMP/bin/php/php7.1.19/bin/phpize
After this, you should see an output similar to your tailored installation instructions.
Then find and run php-config in your MAMP directory (Note: this command must be run from where you have Xdebug stored on your machine). For me, this was:
./configure --with-php-config=/Applications/MAMP/bin/php/php7.1.19/bin/php-config
You'll see a bunch of output... Followed by a, "Build complete." message.
Now you can return to your tailored installation instructions (be sure to skip the next step, Run: ./configure).
Try installing autoconf using brew : brew install autoconf

Compiled vim from source on Mac OSX and getting 'shell returned 127' error?

On my Mac OSX 10.6 machine, I started to use MacVIM for vim. Then I noticed my terminal version was different to the MacVIM version (MacVIM was 7.3 and my terminal version 7.2)... I thought they used the same vim?
I need 7.3 for some of the features. So I set about wanting to update the terminal version. I basically cloned it using Mercurial (the perferred way according to the official site) and then did the usual to compile it. This did work and I now have 7.3 in my terminal. But, on some commands when exiting, I can this error:
/bin/bash: q: command not found
shell returned 127
Press ENTER or type command to continue
...I've tried my hardest to try and fix this problem, but trying to reinstall MacVIM, deleting the vim in my /usr/local/bin and compiling again and I just can't get rid of this annoying error.
Can anyone possibly help me? Am I doing this all wrong? ...most of the time I will be using MacVIM, but it'd be nice for me to have it in the Terminal - exactly how I'd have it on my Ubuntu servers.
Any help would be fantastic!
:!q is not :q!. This is probably not a bug.
The error message you're seeing is is most likely the result of accidentally typing :!q instead of :q!, which would be user error, not a bug. :!q shells out to run q, and your shell (bash) is not finding such a command and bails with 127. (For comparison, you might try :!true, :!false, :!vim %, to get a feel of this.)
There isn't really a “fix” for this, and ! is really useful for other purposes; maybe with more practice you'll make the typo less often. You could also try using ZQ instead of :q!; this has other disadvantages (a typo ZZ will instead save the file if it's edited, and ZQ specifically is a vim extension), but at least you see this error again.
The upshot here is basically check to make sure you typed in your commands right, I guess.
I'm not sure on the exact path, but somewhere a few folders deep into the Applications/MacVim.app folder is the vim executable that will also run in a terminal (Use the -g option to launch it in GUI mode).
You should be able to throw this in your .bashrc:
alias vim=/Applications/MacVim.app/Contents/MacOS/vim
This is the homebrew formula for vim. Try these settings for "configure" or just install homebrew and install vim from there.
system "./configure", "--prefix=#{prefix}",
"--mandir=#{man}",
"--enable-gui=no",
"--without-x",
"--disable-nls",
"--enable-multibyte",
"--with-tlib=ncurses",
"--enable-pythoninterp",
"--enable-rubyinterp",
"--with-features=huge"
system "make"
system "make install"

Resources