3

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?

2
  • What sort of issues did you had? Did it throw error messages during the install? If so, what were this error messages? Could you please provide more information? Dec 4 '13 at 17:39
  • 1
    Question updated :)
    – AppleDevX
    Dec 5 '13 at 1:53
1

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.

4
  • Still doesn't work. When I run source /sw/bin/init.sh it only returns -bash: /sw/bin/init.sh: No such file or directory. It is said that I need to run . /sw/bin/pathsetup.sh/bin/init.sh to access fink but from that point onwards I don't know what to do next.
    – AppleDevX
    Dec 5 '13 at 15:44
  • @AppleDevX Updated based on the fink manual. Does the /sw directory even exist on your system?
    – nohillside
    Dec 5 '13 at 16:25
  • Yes it does. It's on the root of Macintosh HD Machintosh HD > sw
    – AppleDevX
    Dec 5 '13 at 17:55
  • I have installed fink properly, what's the issue is after I had sucessfully installed open cobol using fink install open-cobol-1.0-1 command, the command to test open cobol using cobc --help only returns -bash: cobc: command not found
    – AppleDevX
    Dec 5 '13 at 18:04
1

Have you though of using MacPorts instead? It has OpenCobol 1.1, which you can install with:

port install open-cobol

It works on my mac (but I'm on Mountain Lion).

2
  • Can you tell me how? Do you have COBOL compiler on your Mountain Lion? If so, please tell me how. Thanks.
    – AppleDevX
    Dec 6 '13 at 3:21
  • As I said, look into MacPorts. The command above gives you a open-cobol compiler (cobc) that you can call and use from the command line. Dec 6 '13 at 10:46

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .