5

I need to install f2c in Linux. Given the steps;

  1. Download installation script : Download install_f2c_linux.csh.

  2. Run installation script

    # chmod +x install_f2c_linux.csh
    # ./install_f2c_linux.csh
    

I run the second step in the root and user directory. But, it says

curl: Command not found.
tar: f2c.tar: Cannot open: No such file or directory
tar: Error is not recoverable: exiting now
gunzip: No match.
f2c: No such file or directory.

How to solve the problem?

Melebius
  • 11,121
  • 8
  • 50
  • 77

2 Answers2

7

FORTRAN 77 to C/C++ translator is already packaged in Ubuntu repositories as f2c package.

You can install it with:

sudo add-apt-repository universe
sudo apt-get update 
sudo apt-get install f2c

Note: develop new good habit - before trying to compile something manually visit http://packages.ubuntu.com and search for needed application here.

N0rbert
  • 97,162
  • 34
  • 239
  • 423
  • 1
    Or use `apt-cache search` as an alternative to browser-based search. – Ruslan Sep 21 '18 at 09:31
  • how to search the file like /usr/local/bin/f2c /usr/local/include/f2c.h /usr/local/lib/libf2c.a /usr/local/man/man1/f2c.1t /usr/local/bin/f77 after the installation ? – Puteri Intan Zulaikha Sep 24 '18 at 02:11
  • You should find such files with `find /usr/local -type f -name *f2c*` and then remove them by hand from Midnight Commander (`mc`) or by graphical file-manager started as *root* user. If you want to list files installed with `f2c` package - use `dpkg -L f2c`. – N0rbert Sep 24 '18 at 08:06
4

You have to install curl:

sudo apt install curl

But it is better to use the Ubuntu rep and install with:

sudo apt-get install f2c

as N0rbert posted.

N0rbert
  • 97,162
  • 34
  • 239
  • 423
abu_bua
  • 10,473
  • 10
  • 45
  • 62