How do I install a downloaded deb package? hdparm

Asked by Brian

I'm trying to install a benchmark program called hdpram. I downloaded it extracted it but now I don't know how to get it up and running(:-( Can anyone please help?

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Solved by:
Vu Do Quynh
Solved:
Last query:
Last reply:
Revision history for this message
Vu Do Quynh (vu-do-quynh) said :
#1

Hi,

you probably meant "hdparm" instead of "hdpram"

You better install it from the Ubuntu repository : System > Administration > Synaptic Package Manager > search for hdparm then right-click on it to install if it is not installed yet.

If you dowloaded a more recent version, if the file is a .deb package then you can install it by running in a terminal (Applications > Accessories > terminal) the command:

sudo dpkg -i file.deb

where "file.deb" is to be replaced by the actual filename you've dowloaded. You'll need to provide your password (no characters would show up on the screen)

Hope that helps

Revision history for this message
Brian (brian-murphy) said :
#2

Looks good ):-) thanks I will give it a go.

Revision history for this message
Brian (brian-murphy) said :
#3

Do I enter sudo dpkg -i hdpram.deb ?

Revision history for this message
Brian (brian-murphy) said :
#4

hdparm I mean

Revision history for this message
Vu Do Quynh (vu-do-quynh) said :
#5

Yes !

sudo dpkg -i hdpram.deb

Revision history for this message
Vu Do Quynh (vu-do-quynh) said :
#6

I meant:

sudo dpkg -i hdparm.deb

Revision history for this message
Vu Do Quynh (vu-do-quynh) said :
#7

Beware of dependencies when installing manually .deb packages. It is always better (for the stability of the system) to install software versions that are provided by the repositories.

Revision history for this message
Brian (brian-murphy) said :
#8

MMMMMMMMMMMMmm Then I get: dpkg: error processing hdpram.deb (--install):
 cannot access archive: No such file or directory
Errors were encountered while processing:
 hdpram.deb

Revision history for this message
Vu Do Quynh (vu-do-quynh) said :
#9

Hi,

You need to provide the full path to your hdparm.deb file (i.e. to where you have put it). For instance if you have downloaded it to the Desktop folder you would write:

sudo dpkg -i Desktop/hdparm.deb

or (2nd alternative) you would change to the directory where the file exists, like in our example to the folder "Desktop":

cd Desktop

then (just to be sure)

ls hdparm.deb (to verify that the file do exist in that directory Desktop)

then (if the file is there):

sudo dpkg -i hdparm.deb

Revision history for this message
Brian (brian-murphy) said :
#10

hdparm-9.30.tar.gz Yep file is there but still a no go:
"Desktop$ sudo dpkg -i hdparm.deb
dpkg: error processing hdparm.deb (--install):
 cannot access archive: No such file or directory
Errors were encountered while processing:
 hdparm.deb
 and then I did"

sudo dpkg -i hdparm-9.30.tar.gz
dpkg-deb: `hdparm-9.30.tar.gz' is not a debian format archive
dpkg: error processing hdparm-9.30.tar.gz (--install):
 subprocess dpkg-deb --control returned error exit status 2
Errors were encountered while processing:
 hdparm-9.30.tar.gz

Revision history for this message
Vu Do Quynh (vu-do-quynh) said :
#11

of course it won't work like that: the command was made for a Debian packaged file (with extension .deb). The file you downloaded is not a Debian package file, it is a .tar.gz archive file.

You need to extract the file (easy : right click the file from Nautilus and choose extract) and then you need to read the instructions on how to install a tar.gz file (usually you'll have a README file inside the archive or some other files telling how to install).

But, again, it would be much better for you to install hdparm from the Ubuntu repository with Synaptic or from the command line like this :

sudo apt-get install hdparm

you may need to run

sudo apt-get update

to refresh the list of packages available first.

Revision history for this message
Brian (brian-murphy) said :
#12

Yep did that now??

Revision history for this message
Brian (brian-murphy) said :
#13

Hey, thanks very much for the help. I usually stay away from trying to install any program that is not in the applications/software center. But I hope to be able to learn how to do it.

Revision history for this message
Brian (brian-murphy) said :
#14

What I mean is I ran:

sudo apt-get install hdparm

you may need to run

sudo apt-get update
 and now do I run:sudo dpkg -i hdparm.deb

Revision history for this message
Brian (brian-murphy) said :
#15

Hi, I got this far but ???

Revision history for this message
Vu Do Quynh (vu-do-quynh) said :
#16

Hi again,

No you do not run "sudo dpkg -i hdparm.deb" because you do not have that file to install !

The APT program will do the installation of hdparm after downloading the required package, if necessary.

If you were successful with the following command:

sudo apt-get install hdparm

You'll see that the package had been installed.

If not successful, you'll see instead error messages, that you'll need to interpret or post her for help. Sometimes if the error says that the package cannot be found, you'll need to refresh the list of packages with the command "sudo apt-get update".

Hope that helps

Revision history for this message
Brian (brian-murphy) said :
#17

OK. It all seemed to go OK when I ran: sudo apt-get install hdparm then:sudo apt-get update
but I don't know what to do now ):=?

Revision history for this message
Best Vu Do Quynh (vu-do-quynh) said :
#18

Hi,

If hdparm has been installed, you can launch the program from a terminal by typing:

hdparm

it will shows you some help about using it. You can also read the manual with the following command:

man hdparm

But how to use hdparm is an other question.

You should carefully read the manual or consult sites about how to use hdparm before actually using it on your system !

So if your initial question was solved, mark it as solved and start a new question about "how to use hdparm".

regards

Revision history for this message
Brian (brian-murphy) said :
#19

Thanks Vu Do Quynh, that solved my question.