Raspberry Pi3 Lazarus 1.6.2 安装步骤如下:

安装环境:Raspbian Jessie, RPi3

1.安装subversionunzip

Sudo Apt-get update

Sudo Apt-get install subversion unizp

2.获取和编译最新的FreePascal编译器
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

提示安装下列时,输入?后的内容

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

下载3.0.0 RC2 FPC:

cd /usr/local/fpc

sudo svn co http://svn.freepascal.org/svn/fpc/tags/release_3_0_0_rc2 source

cd source

编译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

你在 Terminal应看到最新版本的版本号:

2.6.4     3.0.0

用看到最新的版本号替换下面的3.0.0

sudo rm -f "/usr/local/bin/ppcarm"

sudo ln -sf "/usr/local/lib/fpc/3.0.0/ppcarm" "/usr/local/bin/ppcarm"

3.下载、编译及安装Lazarus

sudo apt-get update

sudo apt-get install libx11-dev libgdk-pixbuf2.0-dev libcairo2-dev lpango-1.0 libpangox-1.0-dev 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/tags/lazarus_1_6_2 source

cd source

sudo make all OPT=-dFPC_ARMHF

sudo make install OPT=-dFPC_ARMHF PREFIX=/usr/local

sudo rm -rf /usr/local/lazarus --删除已安装的源文件

4.最后的设置:

经过长时间安装, Lazarus终于安装完成。

Raspberry Pi 3 安装 Lazarus 1.6.2(2017-02-09更新)-LMLPHP

当你第一次启动Lazarus, 要求设置FPC sources,输入 /usr/local/fpc/source

 Raspberry Pi 3 安装 Lazarus 1.6.2(2017-02-09更新)-LMLPHP

Raspberry Pi 3 安装 Lazarus 1.6.2(2017-02-09更新)-LMLPHP

编译后的程序运行情况:

Raspberry Pi 3 安装 Lazarus 1.6.2(2017-02-09更新)-LMLPHP

05-07 15:27