# Installing a package in linux

**URL:** <https://boards.straightdope.com/t/installing-a-package-in-linux/231391>\
**Category:** Factual Questions\
**Created:** [February 27, 2004, 1:55am UTC](https://boards.straightdope.com/t/installing-a-package-in-linux/231391 "2004-02-27T01:55:52Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![quelquechose](https://avatars.discourse-cdn.com/v4/letter/q/6f9a4e/32.png) [@quelquechose](https://boards.straightdope.com/u/quelquechose)\
**Post date:** [February 27, 2004, 1:55am UTC](https://boards.straightdope.com/t/installing-a-package-in-linux/231391/1 "2004-02-27T01:55:52Z")

</div>

I have been trying to install Maxima ([http://maxima.sourceforge.net/index.shtml](http://maxima.sourceforge.net/index.shtml)) but I keep having problems. I tried rpm -ivh maxima-5.9.0-1.i386.rpm maxima-exec-gcl-5.9.0-1.i386.rpm(like the example given at the website) but i got the following:  
error: cannot get exclusive lock on /var/lib/rpm/Packages  
error: cannot open Packages index using db3 - Operation not permitted (1)  
error: cannot open Packages database in /var/lib/rpm  
I have installed essentially nothing in Linux, so I’m probably making a very basic and easily corrected error. I have the RPMs saved in my home folder, does it matter where they are? I’m running RedHat 9.0.

---

<div class="post-metadata">

**Author:** ![biqu](https://avatars.discourse-cdn.com/v4/letter/b/7feea3/32.png) [@biqu](https://boards.straightdope.com/u/biqu)\
**Post date:** [February 27, 2004, 2:05am UTC](https://boards.straightdope.com/t/installing-a-package-in-linux/231391/2 "2004-02-27T02:05:36Z")

</div>

Are you trying to install as a normal user? That’s what I would guess from the error  
messages you posted. Try running rpm as root. The superuser account should have the  
necessary permissions to read and write to the rpm database.

---

<div class="post-metadata">

**Author:** ![quelquechose](https://avatars.discourse-cdn.com/v4/letter/q/6f9a4e/32.png) [@quelquechose](https://boards.straightdope.com/u/quelquechose)\
**Post date:** [February 27, 2004, 2:53am UTC](https://boards.straightdope.com/t/installing-a-package-in-linux/231391/3 "2004-02-27T02:53:46Z")

</div>

Thank you, I’ve got it working now. I feel really stupid, since I should have remembered to log in as root.

---

<div class="post-metadata">

**Author:** ![Some\_Guy](https://avatars.discourse-cdn.com/v4/letter/s/439d5e/32.png) [@Some\_Guy](https://boards.straightdope.com/u/Some_Guy)\
**Post date:** [February 27, 2004, 3:31am UTC](https://boards.straightdope.com/t/installing-a-package-in-linux/231391/4 "2004-02-27T03:31:38Z")

</div>

You shouldn’t log in as root - it’s too easy to forget that you’re the superuser and accidentally stomp on something important. Use su instead - e.g., something like

```auto

su -c 'rpm -ivh maxima-5.9.0-1.i386.rpm maxima-exec-gcl-5.9.0-1.i386.rpm'

```

which will automatically prompt you for the root password, run the command as the superuser, and then exit, leaving you with normal priveleges.
