Ubuntu 16.04 LTS -- cannot run fbc

New to FreeBASIC? Post your questions here.
Post Reply
danielnice
Posts: 6
Joined: Apr 23, 2018 20:29

Ubuntu 16.04 LTS -- cannot run fbc

Post by danielnice »

I recently tried to install FreeBASIC on Ubuntu 16.04 LTS.
I am totally new to Linux and FreeBASIC.
I am an experienced DOS, QBASIC, MASM programmer.

I read the forum thread on installing on Ubuntu -- I installed all of the recommended packages.
I extracted the tarball for FreeBASIC into /home/daniel/FreeBASIC
If I open a terminal window from this location and run
sudo ./install.sh -i
I get "FreeBASIC compiler successfully installed in /usr/local.
Sure enough, if I
cd /usr/local/bin
ls -l fbc

I get
-rwxr-xr-x 1 root root 1186680 Apr 23 17:00 fbc

Nevertheless, fbc at any command-prompt gives me
bash: /usr/local/bin/fbc: No such file or directory

The file is obviously there and marked executable according to ls.
Why will it not run?

Furthermore, if I instead
cd /home/daniel/FreeBASIC/bin
ls -l fbc

I get
bash: /usr/local/bin/fbc: No such file or directory

But then if I enter
./fbc
I get
bash: ./fbc: No such file or directory

Any help would be appreciated.
St_W
Posts: 1626
Joined: Feb 11, 2009 14:24
Location: Austria
Contact:

Re: Ubuntu 16.04 LTS -- cannot run fbc

Post by St_W »

You're probably trying to run a 32-bit FreeBasic binary on a 64-bit Linux installation. This doesn't work out of the box (which might be new for you, if you were working with Windows previously) - you've to install 32-bit loader & libraries explicitly.

But instead of installing the 32-bit stuff on your 64-bit Linux system I'd suggest to rather use the matching FreeBasic package (64-bit on 64-bit Linux, 32-bit on 32-bit Linux, ...).

btw, a quick web search would probably have solved your issue as well:
https://stackoverflow.com/questions/394 ... -it-exists
https://askubuntu.com/questions/133389/ ... ile-exists
danielnice
Posts: 6
Joined: Apr 23, 2018 20:29

Re: Ubuntu 16.04 LTS -- cannot run fbc

Post by danielnice »

You were correct -- I downloaded using the green button on the FB website which looked ok to me but was apparently 32-bit.
After installing the 64-bit version, I am now able to compile.
Additionally, I got Geany installed and working.
I'm looking at debuggers now.

Thanks for your help.
Post Reply