LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This 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


Reply
  Search this Thread
Old 05-18-2011, 01:11 AM   #1
Sumguy
Member
 
Registered: Jul 2010
Location: Rural Kentucky, USA.
Distribution: Slackware; Crunchbang.
Posts: 409
Blog Entries: 2

Rep: Reputation: 98
Question Specific Help Installing From .Tar.gz.


Hello, Dudes and Dudettes!

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 downloaded a driver for my new scanner- see here: http://sourceforge.net/projects/hp3900-series/

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!

How do I get this darn thing installed???
 
Old 05-18-2011, 01:28 AM   #2
pcardout
Member
 
Registered: Jun 2003
Location: Socorro, New Mexico
Distribution: Debian ("lenny", "squeeze"), Linux Mint, XUbuntu
Posts: 218

Rep: Reputation: 24
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.

...rock on ... dude
 
Old 05-18-2011, 01:53 AM   #3
Sumguy
Member
 
Registered: Jul 2010
Location: Rural Kentucky, USA.
Distribution: Slackware; Crunchbang.
Posts: 409
Blog Entries: 2

Original Poster
Rep: Reputation: 98
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)
 
Old 05-18-2011, 02:20 AM   #4
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.8, Centos 5.10
Posts: 17,258

Rep: Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328
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.

Try reading
http://rute.2038bug.com/index.html.gz
http://tldp.org/LDP/Bash-Beginners-G...tml/index.html
http://www.tldp.org/LDP/abs/html/

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.
 
Old 05-18-2011, 02:34 AM   #5
Sumguy
Member
 
Registered: Jul 2010
Location: Rural Kentucky, USA.
Distribution: Slackware; Crunchbang.
Posts: 409
Blog Entries: 2

Original Poster
Rep: Reputation: 98
Quote:
Originally Posted by chrism01 View Post
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.

Try reading
http://rute.2038bug.com/index.html.gz
http://tldp.org/LDP/Bash-Beginners-G...tml/index.html
http://www.tldp.org/LDP/abs/html/

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?

Sorry for all the questions.

Youse guys's help is invaluable.

I'm learning!
 
Old 05-18-2011, 03:37 AM   #6
brianL
LQ 5k Club
 
Registered: Jan 2006
Location: Oldham, Lancs, England
Distribution: Slackware & Slackware64 14.1
Posts: 7,453
Blog Entries: 55

Rep: Reputation: Disabled
Run:
Code:
lsmod
to see if the driver's been installed.
 
Old 05-18-2011, 03:40 AM   #7
pcardout
Member
 
Registered: Jun 2003
Location: Socorro, New Mexico
Distribution: Debian ("lenny", "squeeze"), Linux Mint, XUbuntu
Posts: 218

Rep: Reputation: 24
Using the shell to install things

Quote:
Originally Posted by Sumguy View Post
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.
 
Old 05-18-2011, 04:20 AM   #8
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2016, Slack14.1 Deb Jessie, + 50+ other Linux OS, for test only.
Posts: 16,276

Rep: Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156
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' !

..

Last edited by knudfl; 05-18-2011 at 01:44 PM.
 
Old 05-18-2011, 04:42 AM   #9
brianL
LQ 5k Club
 
Registered: Jan 2006
Location: Oldham, Lancs, England
Distribution: Slackware & Slackware64 14.1
Posts: 7,453
Blog Entries: 55

Rep: Reputation: Disabled
Quote:
Originally Posted by knudfl View Post
P.S. : A comment to post #6 : It's libsane-hp3900.so.1.1.0 : No 'lsmod' !

..
Ahah! I was thinking driver = module.
 
Old 05-18-2011, 09:35 AM   #10
pcardout
Member
 
Registered: Jun 2003
Location: Socorro, New Mexico
Distribution: Debian ("lenny", "squeeze"), Linux Mint, XUbuntu
Posts: 218

Rep: Reputation: 24
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).
 
Old 05-18-2011, 09:21 PM   #11
Sumguy
Member
 
Registered: Jul 2010
Location: Rural Kentucky, USA.
Distribution: Slackware; Crunchbang.
Posts: 409
Blog Entries: 2

Original Poster
Rep: Reputation: 98
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!
 
Old 05-18-2011, 10:22 PM   #12
Sumguy
Member
 
Registered: Jul 2010
Location: Rural Kentucky, USA.
Distribution: Slackware; Crunchbang.
Posts: 409
Blog Entries: 2

Original Poster
Rep: Reputation: 98
I just tried
Code:
 sudo /home/bob/Downloads/hp3900-series_0.12/COMPILE.sh
and got:

Code:
line 50: test: -eq: unary operator expected
 
Old 05-18-2011, 10:50 PM   #13
Sumguy
Member
 
Registered: Jul 2010
Location: Rural Kentucky, USA.
Distribution: Slackware; Crunchbang.
Posts: 409
Blog Entries: 2

Original Poster
Rep: Reputation: 98
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?!

Last edited by Sumguy; 05-18-2011 at 10:52 PM.
 
Old 05-18-2011, 11:15 PM   #14
pcardout
Member
 
Registered: Jun 2003
Location: Socorro, New Mexico
Distribution: Debian ("lenny", "squeeze"), Linux Mint, XUbuntu
Posts: 218

Rep: Reputation: 24
sudo /home/bob/Downloads/hp3900-series_0.12/INSTALL.sh

and

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.
 
Old 05-18-2011, 11:19 PM   #15
pcardout
Member
 
Registered: Jun 2003
Location: Socorro, New Mexico
Distribution: Debian ("lenny", "squeeze"), Linux Mint, XUbuntu
Posts: 218

Rep: Reputation: 24
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Get specific file from tar dnaqvi Linux - Newbie 12 10-22-2009 06:55 PM
tar extract specific directory lrt Linux - Software 7 12-01-2007 09:40 AM
Is it possible to unpack a *.tar into a specific directory whammack Linux - Software 3 01-29-2007 07:04 PM
Ignore specific sub directories when using tar MicahCarrick Linux - Software 4 11-16-2006 10:59 AM
How To extract .tar.gz To A Specific Directory? George2 Linux - Software 4 02-18-2006 08:01 AM


All times are GMT -5. The time now is 05:12 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration