Where is the GNU Pascal Compiler?

6,704

Solution 1

It appears that gpc was removed from Debian (and subsequently Ubuntu) in February 2011 due to the project being unmaintained/discontinued.

Solution 2

Not exactly gpc, but if you don't mind an alternative, you could use Free Pascal. This will install the IDE and compiler:

sudo apt-get install fp-ide

Note that the IDE is terminal based. To start it from the prompt:

fp

For reference, see http://fusharblog.com/installing-free-pascal-in-ubuntu/

Solution 3

PPA versions of the GNU Pascal Compiler for Ubuntu can be downloaded from https://launchpad.net/~ueter/+archive/ubuntu/gpc-3.4

Solution 4

You can install the Free Pascal compiler alone using the command:

sudo apt-get install fp-compiler

...then invoke and run a simple program such as:

program Hello;
begin
  writeln ('Hello, world.');
end.

...using the following commands:

fpc hello.pas
./hello
Share:
6,704

Related videos on Youtube

Giorgio
Author by

Giorgio

Updated on September 18, 2022

Comments

  • Giorgio
    Giorgio over 1 year

    On Ubuntu 10.04 I had installed the GNU Pascal Compiler (package gpc).

    After moving to Ubuntu 12.04 / 64 bit I cannot find the package any more. Google and the GNU Pascal homepage did not help much.

    So I wanted to ask if the package has been discontinued, renamed, or moved to a different repository.

  • Giorgio
    Giorgio over 11 years
    +1 This explains a lot. I think I will have to move to the Free Pascal Compiler (package fp-compiler).
  • Eliah Kagan
    Eliah Kagan over 11 years
    @Giorgio Or you can attempt to download and build gpc from source. (Or try to install an old .deb package...)
  • Giorgio
    Giorgio over 11 years
    @Eliah Kagan: True, I will give it a try.
  • Braiam
    Braiam over 10 years
    Welcome to Ask Ubuntu! Whilst this may theoretically answer the question, it would be preferable to include the essential parts of the answer here, and provide the link for reference.
  • Marco van de Voort
    Marco van de Voort over 4 years
    Or have a look at the Lazarus package, which is a more GUI IDE for Free Pascal