How to set the path to the latest Open MPI version? - path

I'm using Ubuntu 14.04 and the installed Open MPI is 1.6.5; I've installed the Latest Open MPI(4.0.0) following these instructions here and set the installed location by-
./configure --prefix=/$HOME/Downloads/openmpi
Then, to set the path I've added these lines to my .bash_aliases file-
om() {
export PATH=$PATH:$HOME/Downloads/openmpi/bin
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$HOME/Downloads/openmpi/lib
}
I've run the om command and then ran mpirun --version but it still outputs-
mpirun (Open MPI) 1.6.5
Report bugs to http://www.open-mpi.org/community/help/
How can I keep and use both the Open MPI versions?
Thank you.

You do not want to append Open MPI to your paths, but prepend it.
om() {
export PATH=$HOME/Downloads/openmpi/bin:$PATH
export LD_LIBRARY_PATH=$HOME/Downloads/openmpi/lib:$LD_LIBRARY_PATH:
}

Related

ros tuetlebot3 launh file

bug
I am using ubuntu version 20.0.4
I have followed all the turtlebot simulation instruction here but don't what is the issue I also check my bashrc file all the path are correct. Can anyone help me
Update by bashrc file
Run the turtlebot launch file
You're running 20.04, which means your ROS version will be Noetic. However the tutorial you're referencing is written for Kinetic; which means you're installing a package for the wrong version.
You can either repeat the install instructions with: git clone -b noetic-devel https://github.com/ROBOTIS-GIT/turtlebot3_simulations.git. Or cd into the cloned package and checkout the right branch via: git checkout noetic-devel.
Note that you'll most likely need to clean your workspace as it will not have built right.

Yeoman. The filename, directory name, or volume label syntax is incorrect

Reinstalled Windows 10 (Version 10.0.14393). Reinstalled the following:
Java
java version "1.8.0_121"
Java(TM) SE Runtime Environment (build 1.8.0_121-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.121-b13, mixed mode)
nodejs (v6.9.5)
NPM (3.10.10)
Yarn (v0.19.1)
Yeoman (installed with yarn global add yo)
When I write yo -v in cmd in any folder, runned with administrator or not, I take:
The filename, directory name, or volume label syntax is incorrect.
UPDATE:
The only workaround I found is to use the full path of yo:
C:\Users\<username>\AppData\Local\Yarn\config\global\node_modules\.bin\yo.cmd
It may be that your PATH does not point to global NPM modules yet. The FAQ and links are more helpful for gnu/linux or mac users. The PATH is a list of the places that your operating system checks whenever you type a command.
Since you are using Windows, to add the modules path temporarily (just for one session) at the prompt, just type (obviously use the correct path with your correct username and please take note of the ; separator character):
path = %path%;C:\Users\<username>\AppData\Local\Yarn\config\global\node_modules\.bin\
You should then be able to run 'yo -v' without pointing to the full path name, since the console now knows to check that folder also. If that works for you, you can add that path permanently using the instructions described on another SO post here.
Finally (and this is only slightly related to your question), since i notice you've got the Windows 10 anniversary update, if you have Linux experience, you may prefer to use "Windows subsystem for Linux", which is a bash shell (Ubuntu 14) on Windows, that you can use instead of the default command prompt. You can find it under "Add / Remove programs --> Turn Windows features on or off --> (scroll right down) --> Windows subsystem for Linux (beta)". Your local file system will be at "/mnt/c" so you can get to it from within the shell or from windows explorer. I've had fewer problems using this and since so many tutorials are written with bash (not command prompt) in mind, it's useful to use it instead of cmd.
You'll need to install dependencies in the usual way using apt-get (as it won't use the ones you've installed on the windows side) and you'll need to prefix commands that make system changes with 'sudo'. e.g.
sudo npm -g modulename

casperjs does not find phantomjs

I've downloaded the latest version of casperjs (1.03) and phantomjs (1.9.2).
So I took this little simple script from the casper page:
var casper = require('casper').create({
verbose: true,
logLevel: "debug"
});
var casper = new require('casper').Casper();
and when I try to run it I get the following error:
noname:phantomjs-1.9.2 Tom$ casperjs/bin/casperjs tipico2.js
Fatal: [Errno 2] No such file or directory; did you install phantomjs?
So, this is my directory structure:
phantomjs-1.9.2/ <-- the folder containing phantomjs
phantomjs-1.9.2/casperjs/ <-- a subfolder containting casperjs
Why does it not work?
The solution is actually very simple. Just export the path where the binary of phantomjs is. In my case this is /Users/Tom/Downloads/phantomjs-1.9.2/bin, hence
export PATH=$PATH:/Users/Tom/Downloads/phantomjs-1.9.2/bin
Faced the same problem when installed casper with npm globally on osx.
At first I've set environment variable PHANTOMJS_EXECUTABLE to path where phantomjs was installed (it's usually /usr/local/lib/node_modules/casperjs/node_modules/phantomjs/lib/phantom/bin/phantomjs phantomjs) with
export PHANTOMJS_EXECUTABLE=/usr/local/lib/node_modules/casperjs/node_modules/phantomjs/lib/phantom/bin/phantomjs phantomjs
this helped only partially as I still got an error like there's no file nor folder /usr/local/bin/phantomjs, so I've just created symlink and pointed it to real binary folder with
ln -s /usr/local/lib/node_modules/casperjs/node_modules/phantomjs/lib/phantom/bin/phantomjs /usr/local/bin/phantomjs
hope this will help someone :)
For OS X:
brew install casperjs --devel
brew install phantomjs
and it will works
If you are getting this error in PHP, place this above your exec:
<?php
putenv("PHANTOMJS_EXECUTABLE=/usr/local/bin/phantomjs");
?>
Where path /usr/local/bin/phantomjs is the path to your phantomjs install. You can get this by typing which phantomjs into terminal for example.
Solution For Windows
STEP 1 - Go to Environment Variables
Start -> Environment Variables -> Environment Variables
or
My PC -> Properties -> Advanced System Settings -> Environment Variables
STEP 2 - Set new PATH to your PhantomJS/bin folder
Select PATH (User or System) -> Edit
New -> Browse -> find your BIN folder in PhantomJS installation on your HDD
Accept
STEP 3 - Test Your Work
Open CMD -> Type "phantomjs -v"
You should get phantomJS version number as answer in any folder in your tree.
I had this problem. Tried on 2 different windows machines.
Deleted all npm installed versions from node_modules folders and AppData / Roaming....
Deleted phantom and casper from c:/ where initially installed.
Downloaded phantom and extracted to Program Files folder from https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-2.1.1-windows.zip
Downloaded casper and extracted to Program Files folder from https://github.com/casperjs/casperjs/zipball/1.1.0
Set System Environment Variable C:\Program Files\phantomjs-2.1.1-windows\bin
Set System Environment Variable C:\Program Files\casperjs-casperjs-b5c59e1\bin
I DIDN'T set PHANTOMJS_EXECUTABLE as some other posts have mentioned. Not sure whether it would make a difference, but 100% working with above steps on Windows 10 with Phantom 2.1.1 and casper 1.1.0
Faced the same problem after installing casperjs with npm globally on osx. The solution is actually very simple. You have to include these lines at the top of your script to connect casperjs with phantomjs.
phantom.casperPath = "/path_to/casperjs/";
phantom.injectJs(phantom.casperPath + "/bin/bootstrap.js");

Setting Ros package path

I just began exploring ROS from the ros.org. I'm having some trouble setting the environment in Ubuntu. I get the following error while trying to set up a workspace automatically every time a new shell is launched.
bash: /opt/ros/fuerte/setup.bash: No such file or directory
bash: /opt/ros/fuerte/setup.bash: No such file or directory
Probably your ROS installation added this to your ~/.bashrc file and somehow the setup.bash file got (re)moved.
Try to locate that file and change the path accordingly. This should set the required enviroment variables in order to run ROS (core) etc.
Check answers.ros.org for ROS-related Q&A. The wiki is also a good source of information: www.ros.org/wiki.
First, open terminal and type the following command:
gedit .bashrc
Then press Ctrl + F and search fuerte. Delete everything about fuerte. Fuerte is old, download the new version groovy..
Check which version of ROS have you installed. There are newer versions of ROS like ROS groovy.
Probably you installed a new one, but follow the guide for the old ROS fuerte. First make sure which distro have you installed.

How to run multiple Groovy/Grails version

As I can run multiple versions of groovy / grails without having to change settings?
GVM (Groovy enVironment Manager) is a great option if you're on Mac, Linux, Solaris, or Windows with Cygwin. GVM supports the installation and management of Groovy, Grails, Griffon, and Gradle.
If Grails is your primary concern and you use a Windows PC in a locked down enterprise where Cygwin isn't an option, look at Gravy or write a batch file as noted above.
It's only about GROOVY_HOME/GRAILS_HOME and PATH environment variables. Start your Grails application from a bat file/shell script which sets these two variables, and you're fine.
Grails distinguishes settings stored in home/.grails for different versions, so versions won't clash there.
If you're on linux or osx, theres a shell script here which might help, and an alternative script is here
I am using 7 grails version on my ubuntu machine . put the code below at the bottom of .bashrc file.
function switchGrails() {
echo “Switching to grails version: $1″
sudo rm /opt/grails
sudo ln -s /opt/$1 /opt/grails
echo “Done!”
}
alias grails225=’switchGrails “grails-2.2.5″‘
alias grails224=’switchGrails “grails-2.2.4″‘
alias grails223=’switchGrails “grails-2.2.3″‘
alias grails233=’switchGrails “grails-2.3.3″‘
alias grails235=’switchGrails “grails-2.3.5″‘
alias grails237=’switchGrails “grails-2.3.7″‘
alias grails2311=’switchGrails “grails-2.3.11″‘
After save and exit . Compile the .bashrc file . Type cd and . .bashrc to compile .bashrc file.
For more reference : https://pkashyap28.wordpress.com/2014/09/11/manage-multiple-grails-application-in-ubuntu/
Add a tip if you are working on Windows: there's a way for quick-changing version of GRAILS. You just need to change GRAILS_HOME & GROOVY_HOME (by script, GUI,...) then CLOSE the cmd window used to run grais-app, then start it again. By this way, the change will be applied and you can avoid restarting.
Following the #tim_yates' answer. (unix based OS).
1- Put all grails versions under opt folder:
/opt/grails-2.3.1
/opt/grails-2.5.3
/opt/grails-3.1.1
2- Download and save grails.sh in somewhere you know. (I put mine at /opt/grails-selector)
Edit your ~/.bash_profile file. The PATH var should point to the folder you put your grails.sh. And set GRAILS_HOME to your default version (in case you are creating a new project, for example, it'll use this default version unless you declare to use another.
export PATH=$PATH:/opt/grails-selector
export GRAILS_HOME=/opt/grails-3.1.9
4- You're good to go. May you need to reopen your terminal or logout-login. When you call grails it will calls the grails.sh and then it looks for the version set in your project. So you it works automatically.

Resources