Try Delphi on Amazon Linux.

Posted by on in Programming

I tried Delphi on Amazon Linux.

Amazon Linux is Linux that exists only in the instance of EC2(AWS).

"Free tier eligible" can be used.


[Create an instance.]

Select Amazon Linux from EC 2 and create a new instance.

It is possible to connect with SSH in the initial state.


[Environment building]

Install the SDK referring to the above URL.

sudo yum groupinstall "Development Tools"

It will be OK if "Complete!" Is displayed.


[Setting up PAServer]

PAServer exists in the 10.2 Tokyo directory.

C:\Program Files (x86)\Embarcadero\Studio\19.0\PAServer\LinuxPAServer19.0.tar.gz

This using the SFTP and put in EC2(Amazon Linux).

Unzip LinuxPAServer19.0.tar.gz.

tar -zxvf LinuxPAServer19.0.tar.gz

Allow 64211 port on EC2 security management screen.


Connect test to start paserver.

Work on the RAD Studio side. [Tools]→[Options]→[Connection Profile Manager]


Enter the IP address,

Confirm that you succeeded by clicking the "Test Connection" button.

[Options]→[SDK Manager]→[Add New SDK]

Select the "Amazon Linux AMI 2017.03".

 Start SDK import.

After Completed, it runs in a new project.

I get an error.

[DCC Error] E2597 C:\Program Files (x86)\Embarcadero\Studio\19.0\bin\ld-linux.exe: error: cannot find -lgcc_s
  C:\Program Files (x86)\Embarcadero\Studio\19.0\bin\ld-linux.exe: error: cannot find -lcurl
  C:\Program Files (x86)\Embarcadero\Studio\19.0\bin\ld-linux.exe: error: cannot find -lz

Install some missing libraries.

sudo yum install -y gcc gcc-c++
sudo yum install -y openssl-devel

Import the SDK again.

Since an error occurs, change the name of so file on Windows side. → →


[Execute this code.]

It is a simple http connection program code using TNetHTTPClient.

  System.Net.HttpClient, System.Net.HttpClientComponent;
  netc_:  TNetHTTPClient;
  res_:   IHTTPResponse;
  s_:     String;
    netc_ := TNetHTTPClient.Create(nil);
      res_  := netc_.Get('');
      s_    := res_.ContentAsString(TEncoding.UTF8);
    on E: Exception do
      Writeln(E.ClassName, ': ', E.Message);



I was able to run Delphi on Amazon Linux(EC2).



Gold User, No rank,
Delphi / C++Builder blogger


  • Chris R758
    Chris R758 Tuesday, 2 May 2017

    Out of interest, in the example code near the end, why do you forcibly call the destructor - is there an ARC bug you're working around...?

  • Please login first in order for you to submit comments
  • Page :
  • 1

Check out more tips and tricks in this development video: