Recent

Author Topic: After upgrading to 0.9.24: bash: lazarus: command not found  (Read 5902 times)

Bart

  • Hero Member
  • *****
  • Posts: 5713
    • Bart en Mariska's Webstek
After upgrading to 0.9.24: bash: lazarus: command not found
« on: November 18, 2007, 01:35:18 pm »
Hi,

I just upgraded Laz 0.9.22/fpc 2.0.4 to Laz 0.9.24/fpc 2.2.0.
rpm complained it could not update to fpc 2.2.0 becuase Lazarus 0.9.22 needs fpc 2.0.4, so I worked around this like (not sure this is how I'm supposed to do this):
Code: [Select]
simenon:/home/bart/downloads # rpm -Uvh fpc-2.2.0-0.i386.rpm
error: Failed dependencies:
        fpc = 2.0.4-0 is needed by (installed) lazarus-0.9.22-0
simenon:/home/bart/downloads # rpm -Uvh fpc-2.2.0-0.i386.rpm --nodeps
Preparing...                ########################################### [100%]
   1:fpc                    ########################################### [100%]
Running on linux
Write permission in /etc.
Saved old config to /etc/fpc.cfg.orig
Found libgcc.a in /usr/lib/gcc/i586-suse-linux/4.0.2
Writing sample configuration file to /etc/fpc.cfg
simenon:/home/bart/downloads # rpm -Uvh fpc-src-2.2.0-071105.i386.rpm
error: Failed dependencies:
        fpc-src = 2.0.4 is needed by (installed) lazarus-0.9.22-0
simenon:/home/bart/downloads # rpm -Uvh fpc-src-2.2.0-071105.i386.rpm --nodeps
Preparing...                ########################################### [100%]
   1:fpc-src                ########################################### [100%]
simenon:/home/bart/downloads # rpm -Uvh lazarus-0.9.24-0.i386.rpm
Preparing...                ########################################### [100%]
   1:lazarus                ########################################### [100%]
simenon:/home/bart/downloads #

Then I tried to start Lazarus from the KDE desktop. It failed with:
Quote
KDEInit could not start '/usr/bin/lazarus'

From the console
Code: [Select]
bart@simenon:~/downloads> lazarus &
bash: lazarus: command not found
bart@simenon:~/downloads> cd /usr/bin
bart@simenon:/usr/bin> ls -l *lazarus*
lrwxrwxrwx  1 root root 22 2007-11-18 12:21 lazarus-ide -> ../lib/lazarus/lazarus
lrwxrwxrwx  1 root root 27 2007-11-18 12:21 startlazarus -> ../lib/lazarus/startlazarus

It seems that the installer replaced the lazarus symlink with a lazarus-ide symlink?

When I first installed Lazarus it placed a Lazarus shortcut on my desktop (don't know if that is the correct name in linux) and in the KDE start menu.
If it can do that, it certainly could also apply changes to these if the target of these shortcuts change?
(As I'm a relative linux newbe, I have absolutely no idea if that is possible at all.)

Bart

Vincent Snijders

  • Administrator
  • Hero Member
  • *
  • Posts: 2661
    • My Lazarus wiki user page
Re: After upgrading to 0.9.24: bash: lazarus: command not fo
« Reply #1 on: November 19, 2007, 09:44:21 pm »
Quote from: "Bart"
Hi,

I just upgraded Laz 0.9.22/fpc 2.0.4 to Laz 0.9.24/fpc 2.2.0.
rpm complained it could not update to fpc 2.2.0 becuase Lazarus 0.9.22 needs fpc 2.0.4, so I worked around this like (not sure this is how I'm supposed to do this):
Code: [Select]
simenon:/home/bart/downloads # rpm -Uvh fpc-2.2.0-0.i386.rpm
error: Failed dependencies:
        fpc = 2.0.4-0 is needed by (installed) lazarus-0.9.22-0
simenon:/home/bart/downloads # rpm -Uvh fpc-2.2.0-0.i386.rpm --nodeps
Preparing...                ########################################### [100%]
   1:fpc                    ########################################### [100%]
Running on linux
Write permission in /etc.
Saved old config to /etc/fpc.cfg.orig
Found libgcc.a in /usr/lib/gcc/i586-suse-linux/4.0.2
Writing sample configuration file to /etc/fpc.cfg
simenon:/home/bart/downloads # rpm -Uvh fpc-src-2.2.0-071105.i386.rpm
error: Failed dependencies:
        fpc-src = 2.0.4 is needed by (installed) lazarus-0.9.22-0
simenon:/home/bart/downloads # rpm -Uvh fpc-src-2.2.0-071105.i386.rpm --nodeps
Preparing...                ########################################### [100%]
   1:fpc-src                ########################################### [100%]
simenon:/home/bart/downloads # rpm -Uvh lazarus-0.9.24-0.i386.rpm
Preparing...                ########################################### [100%]
   1:lazarus                ########################################### [100%]
simenon:/home/bart/downloads #


I think the right way to do this, is to upgrade all three package in one command:
Code: [Select]
rpm -Uvh fpc-2.2.0-0.i386.rpm fpc-src-2.2.0-071105.i386.rpm lazarus-0.9.24-0.i386.rpm

mattias

  • Administrator
  • Full Member
  • *
  • Posts: 210
    • http://www.lazarus.freepascal.org
RE: Re: After upgrading to 0.9.24: bash: lazarus: command no
« Reply #2 on: November 20, 2007, 01:26:06 am »
The lazarus link was renamed to lazarus-ide, because there is already another lazarus executable (package: tct) under linux.

If you need --nodeps then you are doing something wrong. Just update them all at once or uninstall them and install the new versions. Your configs are not removed / kept.

The lazarus shortcut is only replaced if it was not changed. I tried to stick to the standards with the shortcuts, but I'm no KDE expert, so maybe it does not work in all cases.

Bart

  • Hero Member
  • *****
  • Posts: 5713
    • Bart en Mariska's Webstek
Re: RE: Re: After upgrading to 0.9.24: bash: lazarus: comman
« Reply #3 on: November 20, 2007, 11:55:40 pm »
Quote from: "mattias"
The lazarus link was renamed to lazarus-ide, because there is already another lazarus executable (package: tct) under linux.

Ok.

Quote from: "mattias"
If you need --nodeps then you are doing something wrong. Just update them all at once or uninstall them and install the new versions. Your configs are not removed / kept.

As I stated, I'm relatively new to linux. Had no idea that i could
Code: [Select]
rpm -Uvh fpc-2.2.0-0.i386.rpm fpc-src-2.2.0-071105.i386.rpm lazarus-0.9.24-0.i386.rpm like Vincent suggested. Will try that next time. This should prevent rpm from complaining that "fpc 2.0.4 is needed by Lazarus 0.9.22"?

Anyhow, setting up Lazarus from scratch (binary rpms) without at one point using the --nodeps option is going to fail on Suse 10.0 because one of the required packages for Lazarus (I think gtk+ or something the like) has another name on this Suse distribution, and rpm will not recognize it.

In this case I thought it was save to use the --nodeps, since the dependencies it mentioned would be resolved after the upgrade of all the three packages (but maybe I'm wrong). And I'd rather not loose my configuration files (first uninstalling then re-installing)...

Quote from: "mattias"
The lazarus shortcut is only replaced if it was not changed. I tried to stick to the standards with the shortcuts, but I'm no KDE expert, so maybe it does not work in all cases.


Well, I did panic a little when Lazarus refused to start. It would have helped if KDE had said that the file it was supposed to execute dit not actually exist. My first thought was that the binary itself could not be launched.
But after taking some deep breaths I remembered there also was a startlazarus executable, and that one fired up immediately, so I knew the problem probably was more trivial  :P

Bart

 

TinyPortal © 2005-2018