Linux Mint Install fails

Linux specific questions.
Post Reply
longboardman1
Posts: 2
Joined: Jan 21, 2022 18:18

Linux Mint Install fails

Post by longboardman1 »

I'm a Linux newbie but carefully followed installation instructions for installation on the latest Linux Mint. The install step reported FreeBASIC successfully installed. However, when checking installed applications it fails to show up and also fails to run fbc from terninal. BASH reports no such file or application........???? Is it installed in the wrong place or what?.......thanks
badidea
Posts: 2591
Joined: May 24, 2007 22:10
Location: The Netherlands

Re: Linux Mint Install fails

Post by badidea »

Can you give some more details? Your post read like "I did everything correct, but it does not work. What did I do wrong?".
Which version did you download? Which file? 32/64 bit? which install command did you use?

Here on Ubuntu Mate 18.04 fbc is installed in /usr/local/bin/
Do you see fbc there if you run:

Code: Select all

ls -l /usr/local/bin/
longboardman1
Posts: 2
Joined: Jan 21, 2022 18:18

Re: Linux Mint Install fails

Post by longboardman1 »

Sorry for delay ....could not log into forum!! fbc shows up when I list the directory usr/local/bin as suggested. I am in Linux Mint running 64bit and attempted to install 64 bit FreeBASIC. However when I look at installed software, no free basic programs appear. So what does it mean to be installed? Is FreeBASIC fbc installed in the wrong directory? If I cd to /usr/local bin and type fbc I get "No such file or directory" despite the fact it is listed?..........very confusing.........thanks for any help.
Munair
Posts: 1286
Joined: Oct 19, 2017 15:00
Location: Netherlands
Contact:

Re: Linux Mint Install fails

Post by Munair »

The location /usr/local/bin suggests you installed FBC from the manually downloaded installer and you probably installed with ./install.sh. If so, it will not show up in your package manager as an installed package from the repository.

In any case, type fbc -version in the terminal. If it is installed you should see something like:
FreeBASIC Compiler - Version 1.08.1 (2021-07-10), built for linux-x86_64 (64bit)
Copyright (C) 2004-2021 The FreeBASIC development team.
BTW, you don't have to go to /usr/local/bin in order to run fbc. Linux will check bin directories for executables.
caseih
Posts: 2157
Joined: Feb 26, 2007 5:32

Re: Linux Mint Install fails

Post by caseih »

longboardman1 wrote: Jan 27, 2022 23:40If I cd to /usr/local bin and type fbc I get "No such file or directory" despite the fact it is listed?..........very confusing.........thanks for any help.
Note that on Linux and Unix, the current directory is never in the executable search PATH. To run something from the current directory, you must prefix it with "./". For example:

Code: Select all

cd /usr/local/bin
./fbc
There are some good reasons for this behavior but it is possible to add "." to the PATH to make it function like Windows but I don't recommend it.

I'm thought /usr/local/bin is in the PATH on Mint. Are you sure fbc is located there? It would be unusual for fbc to be located in usr/local/bin. Usually fbc lives in a bin directory within a directory containing all of FB's files. If you installed it from a deb package, then you might expect fbc to be in /usr/bin. On my workstation I unzipped FB to /opt. To run it, I do something like:

Code: Select all

/opt/FreeBASIC/bin/fbc
I could put that in my PATH, or stick a symlink for fbc somewhere, but I'm too lazy.

How did you install FB? Where did you get the tarball from, and what commands did you use to unzip it?
speedfixer
Posts: 606
Joined: Nov 28, 2012 1:27
Location: CA, USA moving to WA, USA
Contact:

Re: Linux Mint Install fails

Post by speedfixer »

/usr/local/bin is correct.

A simple 'fbc' from a console there should work.

Possible that permissions, etc are not correct. Happens from time-to-time.

From a console in that directory: 'sudo chmod a+x fbc' should do it.

If you don't get an options listing, then something didn't install correctly.

david
Munair
Posts: 1286
Joined: Oct 19, 2017 15:00
Location: Netherlands
Contact:

Re: Linux Mint Install fails

Post by Munair »

speedfixer wrote: Jan 28, 2022 7:11 /usr/local/bin is correct.

A simple 'fbc' from a console there should work.
Linux is not Windows.
badidea
Posts: 2591
Joined: May 24, 2007 22:10
Location: The Netherlands

Re: Linux Mint Install fails

Post by badidea »

Can you post the (list) reply on:

Code: Select all

ls -l /usr/local/bin/fbc
It should look like this (for fbc 1.08.1 64 bit):

Code: Select all

-rwxr-xr-x 1 root root 2328688 Oct  2 01:36 /usr/local/bin/fbc
speedfixer
Posts: 606
Joined: Nov 28, 2012 1:27
Location: CA, USA moving to WA, USA
Contact:

Re: Linux Mint Install fails

Post by speedfixer »

Linux is not Windows.
But it works.
david@gby:/usr/local/bin$ fbc
usage: fbc [options] <input files>
input files:
*.a = static library, *.o = object file, *.bas = source
*.rc = resource script, *.res = compiled resource (win32)
*.xpm = icon resource (*nix/*bsd)
options:
@<file> Read more command line arguments from a file
-a <file> Treat file as .o/.a input file
-arch <type> Set target architecture (default: 486)
-asm att|intel Set asm format (-gen gcc|llvm, x86 or x86_64 only)
-b <file> Treat file as .bas input file
-c Compile only, do not link
-C Preserve temporary .o files
...
Munair
Posts: 1286
Joined: Oct 19, 2017 15:00
Location: Netherlands
Contact:

Re: Linux Mint Install fails

Post by Munair »

Perhaps, but if an executable is in a system bin folder, you don't have to (shouldn't) go there in order to execute it. It may even give a false sense of executing the right one. E.g. if you extract the latest fbc while an older version is still in /usr/bin. Without ./ (dot-slash) the older version will be the one executed.
speedfixer
Posts: 606
Joined: Nov 28, 2012 1:27
Location: CA, USA moving to WA, USA
Contact:

Re: Linux Mint Install fails

Post by speedfixer »

OPs problem was that it didn't run at all.

Let's fix that before we worry about other issues.
caseih
Posts: 2157
Joined: Feb 26, 2007 5:32

Re: Linux Mint Install fails

Post by caseih »

One command that's super helpful is "which." Since the current directory is never explicitly in the path, even if you are in /usr/local/bin and run "fbc" it will search the path for it. So it might appear to be running it from the current directory, but that's purely coincidence. You can find out what path Linux is using by asking which:

Code: Select all

$ which fbc
/usr/local/bin/fbc
$
Again, to run something in the current directory you prefix it with ./

Code: Select all

./fbc
speedfixer
Posts: 606
Joined: Nov 28, 2012 1:27
Location: CA, USA moving to WA, USA
Contact:

Re: Linux Mint Install fails

Post by speedfixer »

I suspect it was permissions. We need to hear from OP again.
Post Reply