Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
When I try to run progs that I installed from packages, which were precompiled, it simply doesn't work.
Bash - my command interpreter - gives me the reply that the file doesn't exist! Even though I can see it right in front of me!
I have concluded that it's because I need the package to be compiled in my kernel. Is this so?
you seem to have a bunch of different ideas about linux that don't really make sense.... not totally sure where your coming from.
to answer your actual question though, does it have to be compiled for your system, not always no. when RPM's are compiled in a server farm or wherever, they take away with them knowledge about where certain library files exist, and what their file names are. so when you drop it into your own install of that distro, the same files are there. many of these files locations and names hardly ever change between linux versions (across other distro's) so this is not a problem at all. sometimes they do change, and the program no longer runs.
there's no logic in "compiled in my kernel" that doesn't really make sense at all....
if you're having specific problems, with specific programs, post us the REAL error messages, and i'm sure we'll be able to help. one thing though, bash is "bash", not "Bash".. maybe that's your problem there? GNU/Linux shells are case senstive.
There are many reasons why your shell can't find a program to execute. They mostly have to do with paths. If bash doesn't know the path to a binary, it will not find it.
you can do some troubleshooting in this area:
$ echo $PATH
will tell you the paths that your shell knows. if the path to your program isn't listed there, it will not automatically be found and executed.
should execute that binary. note the './' before the binary name, which tells your shell to look in 'this directory'
The file /home/user_name/.bashrc, /home/user_name/.bash_profile, or /etc/profile, depending upon distro, may be edited to add the required path to binaries that are not in standard places, such as this:
As a beginner, stick to RPMs. Either launch them from the GUI or run RPM -i from a terminal. It forces an app to install correctly. As you learn more you'll have a better idea where to put things and how to run them - then you can move "up" to tarballs.
Also, if you *know* a file is executable and is in your current directory, try ./filename (instead of just typing the filename by itself). If you just created a script file, you need to make it executable with chmod.
Specifically, so long as a binary executable is in ELF format it will run on any linux box. However, often times binaries are dependent on libraries that maybe or maybe not be on your system and may or may not be the correct version on your system. That is why it is usually your best bet to get packages designed for your particular distibution.
Now a verity of things could be wrong with how you are trying to do things here. What package manager did you use? How did you install the package? Is the binary in a directory in your PATH? If not you have to call it by it's absolute path (or by ./filename if you are cd to the directory it is in). Some people like to append ./ to there path so they can always run executables in there current working directory... I don't like to do this in case I'm compiling a new version of a program I already have and I want to make sure I know which one is really running (yes, this is easy to do, but I don't like to confuse myself...:-P).
EDIT: Before somebody gets ultra picky on me here... I suppose it is possible to compile your linux kernel without ELF support... but I don't know of any distro's that provide such a setup by default.
Thanks for all the advice, but you haven't told me much I don't know. I can't use RPMs, 'cause I'm using slackware & I don't have an RPM unpacker!
The problem is not libraries that are missing, nor is it that the file not in my path. bash refuses to see the file, it seems. Even if I type ./dillo it doesn't work. bash says that dillo does not exist. But if I type ls, dillo is listed in the file list. Can anyone explain this?
I'm using Slackware 3.5 - I know it's old, but I'm running a 486!
Dillo is already executable, I checked that. It's not a script, it's an ELF file.
Originally posted by jtshaw EDIT: Before somebody gets ultra picky on me here... I suppose it is possible to compile your linux kernel without ELF support... but I don't know of any distro's that provide such a setup by default.
As of 2.6, I believe the kernel itself is ELF... and as such, the support must be present... I think