Recent

Author Topic: [SOLVED] Install Lazarus on Debian Help  (Read 11302 times)

aidv

  • Full Member
  • ***
  • Posts: 173
[SOLVED] Install Lazarus on Debian Help
« on: August 30, 2015, 03:31:18 pm »
I try to install Lazarus and FPC on Debian by following the instructions found here: http://wiki.freepascal.org/Installing_Lazarus#Installing_Free_Pascal_under_Linux

It says that for FPC I need to write "rpm -Uvh *.rpm" in the terminal in order to install,
but I get this error: "bash: rpm: command not found"

So I try to find a way to install RPM, but I only get info on google about Alien being a good substitute.

I try to install Alien.

And then I get the error: "bash: make: command not found"


COuld anybody give me a step-by-step instruction on how to properly install FPC and Lazarus on Debian?
« Last Edit: August 31, 2015, 02:08:53 am by aidv »

renabor

  • Jr. Member
  • **
  • Posts: 73
Re: Install Lazarus on Debian Help
« Reply #1 on: August 30, 2015, 03:49:28 pm »
It is fairly simple:

apt-get install fpc lazarus
FPC 3.2.2 | Lazarus 2.2.3 | Kubuntu 22.04 64bit

aidv

  • Full Member
  • ***
  • Posts: 173
Re: Install Lazarus on Debian Help
« Reply #2 on: August 30, 2015, 04:15:42 pm »
It is fairly simple:

apt-get install fpc lazarus

I seem to have problems with apt-get.

Anything I write using that command gives me either
Code: [Select]
Package "<name of package>" has no installation candidate
or
Code: [Select]
E: Unable to locate package <name of package>
Any suggestions?

Thaddy

  • Hero Member
  • *****
  • Posts: 14205
  • Probably until I exterminate Putin.
Re: Install Lazarus on Debian Help
« Reply #3 on: August 30, 2015, 04:43:12 pm »
Which version of Debian are you using?
Are you connected to the Internet (in your VM?)
Specialize a type, not a var.

renabor

  • Jr. Member
  • **
  • Posts: 73
Re: Install Lazarus on Debian Help
« Reply #4 on: August 30, 2015, 05:37:52 pm »
It is fairly simple:

apt-get install fpc lazarus

I seem to have problems with apt-get.

Anything I write using that command gives me either
Code: [Select]
Package "<name of package>" has no installation candidate
or
Code: [Select]
E: Unable to locate package <name of package>
Any suggestions?

try

Code: [Select]
aptitude install fpc fpcsrc lazarus

(fpcsrc is needed)
FPC 3.2.2 | Lazarus 2.2.3 | Kubuntu 22.04 64bit

aidv

  • Full Member
  • ***
  • Posts: 173
Re: Install Lazarus on Debian Help
« Reply #5 on: August 30, 2015, 09:17:05 pm »
Which version of Debian are you using?
Are you connected to the Internet (in your VM?)

I am running whatever version is the latest right now. I can't find any info from within Debian itself.
And yes, I have internet connection.

Any thoughts?

cdbc

  • Hero Member
  • *****
  • Posts: 1026
    • http://www.cdbc.dk
Re: Install Lazarus on Debian Help
« Reply #6 on: August 30, 2015, 10:19:18 pm »
Hi
Are you sure you don't need root-privileges to install packages?!?
I'm running PcLinuxOs and i need to "su" before i can install...
Btw. aren't lazarus in your repository?!?
Regards Benny
If it ain't broke, don't fix it ;)
PCLinuxOS(rolling release) 64bit -> KDE5 -> FPC 3.2.2 -> Lazarus 2.2.6 up until Jan 2024 from then on it's: KDE5/QT5 -> FPC 3.3.1 -> Lazarus 3.0

aidv

  • Full Member
  • ***
  • Posts: 173
Re: Install Lazarus on Debian Help
« Reply #7 on: August 30, 2015, 10:25:19 pm »
Hi
Are you sure you don't need root-privileges to install packages?!?
I'm running PcLinuxOs and i need to "su" before i can install...
Btw. aren't lazarus in your repository?!?
Regards Benny

I am in SU.

I am re-installing Debian. I'll get back soon.

EDIT:

Ok I've re-installed Debian and successfully installed Make and Build-Essential.

Now when I do

Code: [Select]
aptitude install fpc fpcsource lazarus
I get

Code: [Select]
Couldn't find any package whose name or description matched "fpc"
Couldn't find any package whose name or description matched "fpcsrc"
Couldn't find any package whose name or description matched "lazarus"
Couldn't find any package whose name or description matched "fpc"
Couldn't find any package whose name or description matched "fpcsrc"
Couldn't find any package whose name or description matched "lazarus"


and when I do

Code: [Select]
apt-get install fpc fpcsource lazarus
I get

Code: [Select]
E: Unable to locate package fpc
E: Unable to locate package fpcsrc
E: Unable to locate package lazarus
« Last Edit: August 30, 2015, 10:50:02 pm by aidv »

aidv

  • Full Member
  • ***
  • Posts: 173
Re: Install Lazarus on Debian Help
« Reply #8 on: August 31, 2015, 02:08:23 am »
Ok finally figured it out. Someone might want to update the wiki.

After installing Debian, open Terminal and write
Code: [Select]
sudo chmod 644 /etc/apt/sources.listand press Enter.

Then you need to navigate to
Code: [Select]
/etc/apt/and edit the file
Code: [Select]
sources.list
In that file you remove anything that starts with
Code: [Select]
deb cdrom:
and add the following
Code: [Select]
deb http://httpredir.debian.org/debian jessie main
deb-src http://httpredir.debian.org/debian jessie main

deb http://httpredir.debian.org/debian jessie-updates main
deb-src http://httpredir.debian.org/debian jessie-updates main

deb http://security.debian.org/ jessie/updates main
deb-src http://security.debian.org/ jessie/updates main

(reference: https://wiki.debian.org/SourcesList)

Next open up terminal again and write

Code: [Select]
apt-get update
apt-get upgrade

followed by

Code: [Select]
aptitude install fpc fpcsource lazarus

Took me 2 days to figure out so you don't have to bang your heads against the walls.

And please someone update the wiki.
« Last Edit: August 31, 2015, 04:56:26 pm by aidv »

Leledumbo

  • Hero Member
  • *****
  • Posts: 8746
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: Install Lazarus on Debian Help
« Reply #9 on: August 31, 2015, 05:54:13 am »
After installing Debian, open Terminal and write
Code: [Select]
sudo chmod 777 /etc/apt/sources.listand press Enter.
That's a security hole opened (an attacker may change the URLs to his own repo with infected packages). Edit that file with sudo instead.

munair

  • Hero Member
  • *****
  • Posts: 798
  • compiler developer @SharpBASIC
    • SharpBASIC
Re: [SOLVED] Install Lazarus on Debian Help
« Reply #10 on: August 31, 2015, 08:40:32 am »
Why taking RPM-packages for Debian if DEB-packages are available? The wiki says:
"you can get the RPM or DEB of the Free Pascal compiler"

You should be able to install the latest three DEB-packages (either 32 or 64 Bits) from here:
http://www.lazarus-ide.org/index.php?page=downloads

First install "fpc-src", then "fpc", then "lazarus".

I am not sure about Debian 8 (Jesse), but it works perfectly on Debian 7 (Wheezy), which is probably still the more stable environment. However, if you got it working on Debian 8, I would love to here your experiences.

BTW, Leledumbo is right about the security hole.
« Last Edit: August 31, 2015, 08:48:54 am by Artie »
keep it simple

Signal

  • New Member
  • *
  • Posts: 41
Re: [SOLVED] Install Lazarus on Debian Help
« Reply #11 on: August 31, 2015, 12:06:53 pm »
Because of the nature of Debian, Lazarus is always a version or two behind in the Debian repositories. They are also broken up into multiple packages.

Installing by means of Laz built debs may work OK, but they are built on Ubuntu instead of Debian, AFAIK. That has the potential of being problematic. Installation of the RPMs via alien works well and avoids Unbuntu.

However, both of the above methods can result in naming conflicts between the debian repo's packages and the laz built packages. That can cause real problems during a distribution upgrade unless the packages are locked or pinned, which in itself can be a headache.

A better way, in my opinion, is to build from source and install under the user's home directory.

FPC installed from the Debian repositories does not tend to have these issues, but that might change with the release of 3.0.

aidv

  • Full Member
  • ***
  • Posts: 173
Re: [SOLVED] Install Lazarus on Debian Help
« Reply #12 on: August 31, 2015, 12:27:11 pm »
After installing Debian, open Terminal and write
Code: [Select]
sudo chmod 777 /etc/apt/sources.listand press Enter.
That's a security hole opened (an attacker may change the URLs to his own repo with infected packages). Edit that file with sudo instead.

That's true. I'll edit my post. What is the CHMOD value for read-only?

As of right now, it seems to work fine with Jessie, however I can't seem to install the LNet package properly (visual components) and I can't seem to get TCP communication working properly between vm host and vm guest. But I guess that has nothing to do with Lazarus or FPC.

renabor

  • Jr. Member
  • **
  • Posts: 73
Re: [SOLVED] Install Lazarus on Debian Help
« Reply #13 on: August 31, 2015, 02:47:48 pm »
After installing Debian, open Terminal and write
Code: [Select]
sudo chmod 777 /etc/apt/sources.listand press Enter.
That's a security hole opened (an attacker may change the URLs to his own repo with infected packages). Edit that file with sudo instead.

That's true. I'll edit my post. What is the CHMOD value for read-only?

As of right now, it seems to work fine with Jessie, however I can't seem to install the LNet package properly (visual components) and I can't seem to get TCP communication working properly between vm host and vm guest. But I guess that has nothing to do with Lazarus or FPC.

Correct value for that file are 644

-rw-r--r-- 1 root root

the meaning is:

writeble and readable by owner (root)
readable by owner group (root)
readable by other
FPC 3.2.2 | Lazarus 2.2.3 | Kubuntu 22.04 64bit

aidv

  • Full Member
  • ***
  • Posts: 173
Re: [SOLVED] Install Lazarus on Debian Help
« Reply #14 on: August 31, 2015, 05:17:22 pm »
Thanks guys.

I managed to fix the problem with the network communication.

It had to do with the Network settings of the Virtual Machine.

Rather than using NAT, use Bridged Adapter (in Virtualbox) and select your host network adapter, in my case the WiFi adapter.

Now the Virtual Machine IP matches the IPs on my network, 192.168.1.xxx.

However my own app does not seem to be able to receive any network data, only the LNet console example called LServer seems to be able to receive network data.

Weird, but completely up to me now I guess.

Edit: Actually not weird at all. I've moved from LNet visual components to non-visual comopenets which requires that you call the method "CallAction" from within TLTCP or TLUDP in order for the components to trigger any events.
« Last Edit: August 31, 2015, 07:18:11 pm by aidv »

 

TinyPortal © 2005-2018