Installing openmpi onto OSX Yosemite using macports - macos

I'm currently trying to install openmpi onto my mac (OSX Yosemite) using Macports. I've tried this several times and each time the install seems to be successful, but it then doesn't seem to work when trying to use it. For example, entering "ompi_info" returns "-bash: ompi_info: command not found". Reading around similar threads, it seems like there might already be some openmpi installed on a mac but without a fortran compiler, and so the openmpi I am trying to install is going into another place, which I need to add to the PATH. Is this right, or is something else the problem? And how do I solve it?
Thanks a lot for any help you are able to give!

Ports should take care of your paths, but you might still need to select it for your MPI. You might try something like this:
sudo port install openmpi-gcc5 +fortran
sudo port select gcc mp-gcc5
sudo port select mpi openmpi-gcc5-fortran

Related

Installing pyodbc and unixodbc on a mac

I've seen Pypyodbc: Can't open lib 'FreeTDS' : file not found") error when trying to connect to SQL server, but. that's 7 years old, and doesn't seem to be working for me, possibly because brew appears to be putting things in different places now?
I've used brew to install unixodbc, it's in /opt/homebrew/Cellar.
When I do pip install pyodbc, it appears to work, but I get:
connection = pyodbc.connect(connection_string)
pyodbc.Error: ('01000', "[01000] [unixODBC][Driver Manager]Can't open lib '/usr/local/lib/libtdsodbc.so' : file not found (0) (SQLDriverConnect)")
which is obviously wrong, because libtdsodbc is in /opt/homebrew/lib
I tried editing odbcinst.ini, but I'm not sure where that's supposed to live. There wasn't one in /etc, or a /etc/unixODBC directory... and when I create either one, the don't seem to be read, because it still complains about /usr/local/lib...
ETA: This is on a new Macbook, so on one of the new M1 chips.
Note: This is a BAD answer in the hopes of attracting a good one, but it technically seems to be working.
Homebrew for M1 installs everything in /opt/homebrew. Everything else expects things in /usr/local. On a new computer, /usr/local/lib didn't even exist. So I did
sudo ln -s /opt/homebrew/lib /usr/local/lib
THIS IS VERY BAD AND I KNOW IT But it's the only way I've figured out currently to deal with the problem. Maybe something hasn't caught up to M1? I'm not sure.
BETTER solution:
export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:/opt/homebrew/lib
There is a pull request that has been pretty much ignored for 13 months now by the pyodbc maintainer: https://github.com/mkleehammer/pyodbc/pull/870
You can install the forked version with this command (might need to uninstall the previous version or add extra arguments to force reinstall)
python3 -m pip install git+git://github.com/Aloisius/pyodbc.git#m1-homebrew

How to install libraries (mysql connector cpp) on Mac using terminal and make things simple as in the case of Ubuntu

I will share an example.
I had to install mysql connector c++ libraries for my project.
To install connector c++ on my Mac, i had to build it from the source code and it takes a lot of effort because you get errors sometimes and then it is troublesome, something which should have been done in a short time.
In case of Ubuntu, I just had to write one command in the terminal, and wow, everything just got done automatically.
apt-get install libmysqlcppconn7
Does anybody know any similar command in mac, using brew or macports?
I tried to find but I guess I didn't get any results to satisfaction.
And if there is not, can anyone guide me so that I can make it possible, like I think it's possible for mac, if it is possible in ubuntu.
Please guide me, an answer in a bit detail would be so much appreciated.
Probably the nearest thing to apt-get on a mac is brew
Once it is set up (and this isn't difficult) "brew install mysql-connector-c++" will install on the mac

ImageMagick + El Capitan Unable to Locate Module

UPDATE: Solved with the solution here
I have spent the better part of my day trying to get ImageMagick to work with Grunt, with no luck. Grunt seems to be okay, but ImageMagick not so much, even though I've run the test on ImageMagick.org to make sure that it's installed correctly (I used HomeBrew for the install).
I get this error when trying to run a task:
Warning: Command failed: identify: unable to load module
'/usr/local/Cellar/imagemagick/6.9.2-4/lib/ImageMagick//modules-
Q16/coders/jpeg.la': file not found # error/module.c/OpenModule/1300.
identify: no decode delegate for this image format 'JPEG' #
error/constitute.c/ReadImage/501.
I've tried the solutions here and here, but none of them have helped.
(FYI I'm new to using the command line.)
Help?
As with any homebrew problem, I would suggest you run
brew doctor
first, to try and sort things out. It is an excellent diagnosis tool.
Now, to your specific problem... mmmm... the /opt/X11 part of your error message worries me because homebrew installs in /usr/local/bin and /usr/local/Cellar so your ImageMagick should not be looking anywhere in /opt at all. I guess you have installed freetype via MacPorts or some method other than homebrew.
I would suggest you install the freetype stuff using homebrew, i.e.
brew install freetype
Then I would suggest uninstalling any other freetype stuff you have installed any other way. Finally, I would suggest you check your PATH environment variable and make it point to /usr/local/bin before anything in /opt. You will need to log out and back in for the new PATH to take effect - you can check your PATH like this:
echo $PATH
and change it by editing $HOME/.profile if you need to.
The homebrew version of freetype provides version 19 of the library and is therefore compatible with the homebrew ImageMagick version.
Also, I am a little disconcerted by the X11 part in your error message - modern Macs don't really use X11 any more and it doesn't ship with OSX. Let's see if the above ideas sort you out before worrying about that too much though - unless you know, and can say for sure, that you need X11.

Cannot install Clang on Archlinux

For my second year we need to learn how to use linux (at a beginner level) and our professor told us to use Ubuntu, or ArchLinux if we wanted to learn more. I installed ubuntu and the required tools (he gave us a short list) but Archlinux freeze completly when I try to install clang and I have to recreate a new Virtual machine (I am on a Mac using VMWare) each time
here is the list of tool needed:
emacs
clang (>=3.4)
gcc (>= 4.8)
make
xterm
For each one it works but for clang
Here is the error I get:
image http://img11.hostingpics.net/pics/876673ScreenShot20140906at182459.png
and it doesn't respond anymore so I have to forcequit my VM and reinstall a new one. Has anybody already encountered this error ? Does anybody know what it means ? I tried pacman -Syu but it has not done anything...
Thank you
First It looks like a error that your VM hard drive is broken.
But it just 'maybe'.
Try to reboot it and try install commands again.
If it still can't work try to add -o $(pidof mount.ntfs-3g) to kill_all_wait() in /etc/rc.d/functions and reboot it.

How do I install ack on OS X (10.8.4)?

I am new to OS X and I am unable to figure out how to install ack. The instructions here didn't help, because the command "install" is failing. Please guide me proper commands.
So far, I have downloaded ack 2.04 and placed it in the /usr/bin folder and then ran perl Makefile.PL successfully. The next command install isn't working for me.
If you use Homebrew you can simply do:
$ brew install ack
If you are new to OSX I highly recommend this approach because it makes installation of stuff like this MUCH easier. It is a package manager for OSX.
Homebrew link: http://brew.sh/
You can also use the MacPorts installer for OSX:
sudo port install p5.<nn>-app-ack
where <nn> is the version of your Perl installation (Ack is written in Perl). If you don't know the version of Perl you have installed, just type:
perl --version
and you'll know what you need for the port command. The Ack installation page has the information you need for this. More information about MacPorts can be found here.
Searching the web, you'll find LOTS of opinions about Homebrew versus MacPorts. I've used both; they both work (and both fail occasionally - installation of this kind is complex). You'll need to pick one or the other and stick with it as Homebrew doesn't play nicely with MacPorts (or vice versa, depending on your POV). Overriding choice for me is MacPorts as it has many more packages than Homebrew and it puts its stuff in /opt/local to stay out of the way of other programs. YMMV

Resources