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!
Notices
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.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Yes....I've been using Ubuntu 10.04 for almost a year now...and I'm still an ignorant noob! (....a testament to the simplicity of modern Linux- it's made me lazy)
I extracted the tar.gz, and double clicked the "install.sh." and got it to run in terminal.....then selected my options (i.e. "stand alone" and "Ubuntu"....but instead of the terminal showing that the driver was installed or anything, the terminal just disappears!
Distribution: Debian ("jessie", "squeeze"), Linux Mint (Serena), XUbuntu
Posts: 221
Rep:
Dude --
Time to learn how to use a terminal. It's definitely a linux thing, and if you don't get to it eventually you will be a noob forever.
install.sh is indeed an install script, but it is probably not meant to be "double-clicked". First figure out what directory it's in. Let's say it's in
/home/duuude/Downloads.
Pull-down "Applications/Accessories/Terminal". Now you have a terminal in front of you, and it's in your home directory (/home/duuude/, also called "~").
now
Code:
cd /home/duude/Downloads.
./install.sh
After the script runs, the window will not close.
This is so basic to Linux that no one thought to make an install script that keeps the window open (though it can definitely be done).
If my instructions are not clear enough, read "An introduction to the shell" or something similar.
O-K, I copied the location of install.sh from the directory, pasted it into the terminal like this:
Code:
cd /home/bob/Downloads/hp3900-series_0.12/INSTALL.sh
...and it just says "[address] no such file or directory directory".
I have used the terminal successfully in the past (believe it or not)....
And I did get this to run in the terminal, like I said, by double-cliking....and it did present the various options which the readme file says it should.....but rather than showing anything was installed or just leaving a new prompt, like I said, the terminal just disappears. Are you saying this is normal?
Thanks for your help....
I'll get the hang of this eventually... (I just use terminal so infrequently, and install things so rarely, that I forget what I learned the previous times)
1. you can only cd (change dir) to a dir ... install.sh is a file
2. if the install appeared to run, the it prob did. however, note that *nix is a 'quiet' system, partly because it's designed to ease automation.
This means that (in general), if a program succeeds, it won't throw out a msg to say so. It does however set the status ( '$?' ) to zero.
At the cmd line this looks like
Code:
./prog
echo $?
which should echo '0' ie zero if all went well. If the prog failed for some reason, you'll get a different number, specific to the prog and failure mode.
You can really leverage the power of *nix if you become familiar with the cmd line.
You may want to start a set of notes for cmds that look useful until they become obvious.
1. you can only cd (change dir) to a dir ... install.sh is a file
2. if the install appeared to run, the it prob did. however, note that *nix is a 'quiet' system, partly because it's designed to ease automation.
This means that (in general), if a program succeeds, it won't throw out a msg to say so. It does however set the status ( '$?' ) to zero.
At the cmd line this looks like
Code:
./prog
echo $?
which should echo '0' ie zero if all went well. If the prog failed for some reason, you'll get a different number, specific to the prog and failure mode.
You can really leverage the power of *nix if you become familiar with the cmd line.
You may want to start a set of notes for cmds that look useful until they become obvious.
Ah...so....
That makes sense. It just occured to me, that if I had run it by typing a command into the terminal, THEN I likely would have seen what it was doing and be returned to a blank prompt again i9n the terminal after it was done. No? But since I ran it by double clicking, it just did what it had to do and then exited, since I did not initially have the terminal open. Correct?
Just for future reference, if I wanted to run that INSTALL.sh from the terminal, what command would I type before the address?
And one more thing: If the install was successful....I probably have 2 instances of the same driver residing on my 'puter now, since I did the double click thingie twice. Would this cause problems? How do I see if I have two installed? And how do I delete one, if need be?
Distribution: Debian ("jessie", "squeeze"), Linux Mint (Serena), XUbuntu
Posts: 221
Rep:
Using the shell to install things
Quote:
Originally Posted by Sumguy
O-K, I copied the location of install.sh from the directory, pasted it into the terminal like this:
Code:
cd /home/bob/Downloads/hp3900-series_0.12/INSTALL.sh
...and it just says "[address] no such file or directory directory".
As the next poster pointed out to you would have had to do this ...
Code:
cd /home/bob/Downloads/hp3900-series_0.12/
./INSTALL.sh
Even though Ubuntu completes the Windows-like illusion that you get everything done by "clicking", when
you "click" a folder called /home/bob/foo in the gnome file manager, you are really doing
cd /home/bob/foo, and when you then click in "INSTALL.sh", you are really doing
./INSTALL.sh. It really DOES pay to learn to use the command line. For example, you
do not need to click on Firefox, you can just type firefox from any command line.
Likewise, try
Code:
cd /home/bob/Desktop
touch garbage
(You'll see a new icon called garbage appear on your Desktop).
rm garbage
(The icon goes away).
The pointy-clicky stuff is all an illusion. The MicroApple's of the world want you to be clueless so you
keep buying their stuff. Linux gives you a GUI for convenience but all the power (and much more)
is there at the command line. We really hope you learn it.
Also....
Quote:
... It just occured to me, that if I had run it by typing a command into the terminal, THEN I likely would have seen what it was doing and be returned to a blank prompt again i9n the terminal after it was done. No? But since I ran it by double clicking, it just did what it had to do and then exited, since I did not initially have the terminal open. Correct?
You got it ... that's why I told you to use the shell to begin with. Sorry I didn't make it clear.
Quote:
Just for future reference, if I wanted to run that INSTALL.sh from the terminal, what command would I type before the address?
I answered that question, twice now. Here's the background. Some commands are already in your "path", you don't need to type
anything before running them. For example "firefox", "gedit", "ls". Other commands (particularly any custom .sh like you just
asked about) can only be run by giving their explicit path or by changing to the directory that they are in and then issuing the
command with the ./ before-hand. The command has to be "executable".
Tell us when you've read about the shell. Read the bash-beginners link that chrism gave you.
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511
Rep:
The 'README.en' says :
Quote:
Steps to install project
------------------------
- Just type ./INSTALL.sh as root
- You have to select if you want to install the SANE backend or the stand-alone
application.
- Then you have to select your linux distro. If your distro is listed, you won't
need to compile project because there are compiled binaries ready to install.
The start command for Ubuntu is then : sudo ./INSTALL.sh
... And select "SANE backend".
P.S. : A comment to post #6 : It's libsane-hp3900.so.1.1.0 : No 'lsmod' !
Distribution: Debian ("jessie", "squeeze"), Linux Mint (Serena), XUbuntu
Posts: 221
Rep:
On being root
knudfl brings up a good point, someguy.
If that install.sh script wanted you to be the root user (which as he points out, can be accomplished with sudo in Ubuntu), then the "pointy-clicky" thing that you originally posted about may have failed to
install the driver (since you installed as bob, not root), unless the script at some point asked for the administrator password. You probably got an error message such as "not root", or "write access not allowed".
When you run it again from the shell you will know for sure. I'd say do it again.
You can even let us know what messages you get when you do it again. My recollection with the HP printer drivers is that installing them more than once
is not such a big deal. You may just end up with a couple print queues for the same printer.
Here's another reason to use the command-line more, btw. It's much harder to get precise tech support from other users when it's all "pull-down this, and
click that". If you work at command line, you can paste exactly what you typed into a post (which is what you have started doing now).
Thanks to everyone for the advice- but none of this is working....
I type "sudo ./INSTALL.sh" and get "command not found".
I try the various things to see if the driver is already installed, and just get a list of gobbledygook- which doesn't even show the drivers that I KNOW are installed (like my printer driver, for example)
I tried the libsane thing...."command not found".
This is getting frustrating.
I just tried "sudo /home/bob/Downloads/hp3900-series_0.12/INSTALL.sh"....
I get this:
Code:
p3900-series - INSTALLER
Created by <>
/home/bob/Downloads/hp3900-series_0.12/INSTALL.sh: line 48: test: -eq: unary operator expected
/home/bob/Downloads/hp3900-series_0.12/INSTALL.sh: line 93: test: -eq: unary operator expected
Installation supposes you've already installed SANE in your system
Checking that path variables point to the right places ...
Binaries not found. Must compile first...
/home/bob/Downloads/hp3900-series_0.12/INSTALL.sh: line 166: ./COMPILE.sh: No such file or directory
Aborting installation process ...
Well...I'm getting closer....
This seems to be saying that there is no SANE installed? According to the synaptic package manager, SANE is installed.....
Now I know why people get disgusted with Linux! (Not Linux's fault....but it's annoying when you're trying to get something done and can't do it!!!)
Gonna play around with the SANE thing a little- in the meantime, if anyone has any ideas before I go inSANE!
Almost thought I had it- I re-installed SANE and XSANE....
Then opened XSANE through the "graphics" menu.....and it seemed to support full functionality for the scanner.
So I tried to copy a slide (th scanner has a built in adapter)
But now there are two new problems:
1)When I try to view the scanned slide, no image comes up, because it says ".pnm file has an image height of 0" (And I see nowhere to adjust image height)
2)When I try to scan again, I keep getting a message that says "Failed to start scanner - invalid argument". And the only way I can get it to work again is to close out XSANE and re-open it again!!!!!
This is insanity!!!!!
Tried to install the driver again...and still get the message about "Presupposes SANE already installed" and then it aborts. The terminal doesn't see that SANE is in there?!
cd /home/bob/Downloads/hp3900-series_0.12
sudo ./INSTALL.sh
are subtlely different.
In the first case, you are in god knows what directory running INSTALL.sh which then looks for COMPILE.sh and may or may not
find it depending on how clever the script writer was.
In the second case, you are already in the directory with INSTALL.sh and COMPILE.sh, so when INSTALL looks for COMPILE, it probably will
find it.
Try it the second way and tell us if your life improves.
Distribution: Debian ("jessie", "squeeze"), Linux Mint (Serena), XUbuntu
Posts: 221
Rep:
Also ... there MUST BE INSTRUCTIONS for the install. As a noob you may be missing something. Post the instructions ... maybe something obvious will jump out.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.