MacOS – Install COBOL on OSX Lion

developmentmacmacbook promacos

Is there any way to install COBOL on OSX Lion? I tried installing OpenCobol 1.1 for Mac http://www.opencobol.org/ using fink using these command fink install open-cobol-1.0-1. Everything is installed well but when I enter the cobc --help to check OpenCobol status, terminal only returns -bash: cobc: command not found

Any workaround on how to properly configure OpenCobol on OSX Lion? or is there any other way/s to install COBOL on Mac?

Best Answer

Fink installs software in /sw/bin which isn't in your PATH by default. According to the manual you need to run

/sw/bin/pathsetup.sh

after installation.

[This] command runs a little script to help set up your Unix paths (and other things) for use with Fink. In most cases, it will run automatically, and prompt you for permission to make changes. If the script fails, you'll have to do things by hand (see below).

(If you need to do things by hand, and you are using csh or tcsh, you need to make sure that the command source /sw/bin/init.csh is executed during startup of your shell, either by .login, .cshrc, .tcshrc, or something else appropriate. If you are using bash or similar shells, the command you need is . /sw/bin/init.sh, and places where it might get executed include .bashrc and .profile.)

Once you have set up the paths, open a new Terminal.app window, and close all other ones. That's it, you now have a base Fink system installed.