Run text mode app in Ubuntu Server lazarus / 32-Linux ---------------------------------------------------------------------- ricardo.consolo · 2013-04-07 22:38 Have build an app that runs only in text mode with Lazarus (1.0.. When trying to run on a production server (Ubuntu Server 10.04), it displays "Cannot find program X". The app is called ccf and I run it like './ccf'. It runs fine at my developer virtual box (kubuntu 10.04). The server runs fine a "Hello World" app. My app access a MySQL database. Have installed mysql-client and fpc on server but same message persists. Any advice? Thanks. ---------------------------------------------------------------------- Dibo · 2013-04-07 23:01 "Cannot find program X" - this is exactly what you get? Or X is replaced by your application name?If not then it seems that console application is trying to act like visual application (trying to run X server which ubuntu server doesn't has by default). Make sure that your console application don't have any visual dependencies like LCL, FCL in Project -> Project inspector -> Required packages ---------------------------------------------------------------------- taazz · 2013-04-07 23:15 what happens to the datamodules then? ---------------------------------------------------------------------- Dibo · 2013-04-07 23:37 I did simple console test on linux mint (debian distro) with TDataModule, it doesn't need LCL. My "Required package" section is empty. If project has LCL in "Required package" then all visual libs are fired like GTK, QT etc even if console application is working like console application. But I'm not sure, LCL mean "Lazarus Components Library" so it not mean "visual" but it is equivalent of delphi VCL which mean "Visual Componets Library" ---------------------------------------------------------------------- BigChimp · 2013-04-08 05:05 LCL has dependencies on widgets by default. If you want to eliminate those, select the NoGUI "widgetset" for LCL in the project options. ---------------------------------------------------------------------- ricardo.consolo · 2013-04-10 20:14 Wow! Thanks for the responses. The message is not about the X screen. Sorry on that. The message is: -bash: ./r36migccf: File or Directory not found I started to rebuild the project looking for the unit who was causing that. Found it: mysql51conn. Just by declaring it, this msg happens. Right now I'm creating a new vbox with Ubuntu Server (10.04) to install the latest fpc as I found that sqldb is dependent on that. Will write the results on next post. ---------------------------------------------------------------------- ricardo.consolo · 2013-04-11 13:31 Nope. I installed these packages and the message remains: sudo apt-get install build-essential binutils; sudo dpkg -i fpc*; fpc is 2.6.2. If I comment the uses clause on that code, the app runs fine: Code: [Select]uses   mysql51conn; What file or directory could this unit is looking for? ---------------------------------------------------------------------- BigChimp · 2013-04-11 13:39 The mysql-dev .so files that are used to connect to the db along with any files they require, I'd say. ---------------------------------------------------------------------- ricardo.consolo · 2013-04-11 20:28 No lucky finding it. The mysql51conn uses an inc file located at /usr/share/fpcsrc/2.6.2/packages/fcl-db/src/sqldb/mysql. Have installed the fpc source package and added this path to the system. The message persists. ---------------------------------------------------------------------- BigChimp · 2013-04-12 03:36 Added what path to what system? Why? What about simply going to your Laz and fpc directories and running a recursive grep on that filename? (Yes, very primitive, but may work) ---------------------------------------------------------------------- ricardo.consolo · 2013-04-12 14:17 (very) Basic mistake. The target machine is a 64bit SO. I was compiling for 32. I just wish for a more helpfull error message from fpc compiled app. Thanks.