how to run a .sh package from command line

Asked by Doja

Trying to install netbeans-6.1-linux.sh

what steps do I need to take to run the file?

here is what I have done that fails.

reidojackson@reidojackson-desktop:~/Desktop$ chmod +x ./netbeans-6.1-linux.sh
reidojackson@reidojackson-desktop:~/Desktop$ apt-get install netbeans-6.1-linux.sh
E: Could not open lock file /var/lib/dpkg/lock - open (13 Permission denied)
E: Unable to lock the administration directory (/var/lib/dpkg/), are you root?
reidojackson@reidojackson-desktop:~/Desktop$ sudo -i
[sudo] password for reidojackson:
root@reidojackson-desktop:~# apt-get install netbeans-6.1-linux.sh
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Couldn't find package netbeans-6.1-linux.sh
root@reidojackson-desktop:~#

I dont understand why it wont run.

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu firefox Edit question
Assignee:
No assignee Edit question
Solved by:
Doja
Solved:
Last query:
Last reply:
Revision history for this message
marcobra (Marco Braida) (marcobra) said :
#1

To run a shell script using terminal please try:

chmod +x ./netbeans-6.1-linux.sh

./netbeans-6.1-linux.sh

or

sudo ./netbeans-6.1-linux.sh

Hope this helps

Revision history for this message
marcobra (Marco Braida) (marcobra) said :
#2

Using System->Administration->Software sources [Ubuntu software tab] please enable (Check the checkbox) all the showed repositories rows.

Then open a Terminal from the menu Applications->Accessories->Terminal and type:

sudo aptitude update
sudo aptitude upgrade
sudo apt-get install netbeans

give your user password when requested, you don't see nothing when you type it, then press enter.

Hope this helps

Revision history for this message
Doja (reidojackson) said :
#3

the chmod finally seemed to work, and then the sudo ./netbeans-6.1-linux.sh command worked.

thanks,