Raspberry Pi 2 install the latest version FPC and Lazarus 1.5
The Raspberry Pi2 launched in February 2015 does not support Lazarus installation using the previous method. When installing fpc, the following problems occur.
Slave:
1. Install subversion and unzip
Sudo Apt-get update
Sudo Apt-get install subversion unizp
2. Obtain and compile the latest FreePascal Compiler
Sudo mkdir/usr/local/fpc
Cd/usr/local/fpc
Sudo wget http://sourceforge.net/projects/freepascal/files/Linux/2.6.4/fpc-2.6.4.arm-linux.tar
Sudo tar xvf fpc-2.6.4.arm-linux.tar
Cd fpc-2.6.4.arm-linux
Sudo./install. sh
When prompted to install the following, enter? Post content
Install prefix (/usr or/usr/local )? /Usr/local
Install textmode IDE (y/n )? Y
Install FCL (y/n )? Y
Install Packages (y/n )? Y
Install Documentation (y/n )? Y
Install Demo (y/n )? Y
Download the latest FPC version:
Cd/usr/local/fpc
Sudo svn co http://svn.freepascal.org/svn/fpc/trunk trunk
Sudo svn export -- force trunk trunktmp
Cd trunktmp
Compile FPC:
Sudo make all OPT =-dFPC_ARMHF
Sudo make install OPT =-dFPC_ARMHF PREFIX =/usr/local
Sudo make install sourceinstall OPT =-dFPC_ARMHF PREFIX =/usr/local
Cd/usr/local/lib/fpc
Ls
You should see the version number of the latest version in Terminal:
2.6.4 3.1.1
Replace the following 3.1.1 with the latest version number (the latest version number is 3.1.1)
Sudo rm-f "/usr/local/bin/ppcarm"
Sudo ln-sf "/usr/local/lib/fpc/3.1.1/ppcarm" "/usr/local/bin/ppcarm"
3. Compile and install the latest Lazarus Version
Sudo apt-get update
Sudo apt-get install libx11-dev libgdk-pixbuf2.0-dev libcairo2-dev lpango-1.0 xorg-dev
Sudo aptitude install libgtk2.0-dev libgdk-pixbuf2.0-dev libpango1.0-dev
Sudo mkdir/usr/local/lazarus
Cd/usr/local/lazarus
Sudo svn co http://svn.freepascal.org/svn/lazarus/trunk trunk
Sudo svn export -- force trunk trunktmp
Cd trunktmp
Sudo make all OPT =-dFPC_ARMHF
Sudo make install OPT =-dFPC_ARMHF PREFIX =/usr/local
4. Final settings:
After three hours of installation, Lazarus is finally installed.
When you start Lazarus for the first time, you need to set FPC sources, input/usr/local/fpc/trunk
Compiled program running status:
This article permanently updates the link address: