Where is the GNU Pascal Compiler?
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
Related videos on Youtube
Giorgio
Updated on September 18, 2022Comments
-
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 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 over 11 years@Giorgio Or you can attempt to download and build
gpc
from source. (Or try to install an old .deb package...) -
Giorgio over 11 years@Eliah Kagan: True, I will give it a try.
-
Braiam over 10 yearsWelcome 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 over 4 yearsOr have a look at the Lazarus package, which is a more GUI IDE for Free Pascal