# [SOLVED] Ubuntu package installation help



## bubusam13 (Jun 8, 2011)

help help help..... i m new to Ubuntu and this has become a headache.

! month ago I installed ubuntu 10.10. Then I downloaded many .deb packages and saved those in my hard disk for future use. Due to some circumstances I have to uninstall ubuntu  later.

Now after 3 months I again Installed ubuntu 10.10.
I have gone to system> administration>synaptic package manager > File (menu) > add downloaded packages. 
I selected all the packages I have previously saved in my hard disk. I had my Internet disconnected then. After selecting when I apply changes, installation fails.

I now connected my Internet and clicked apply changes. Now synaptic in again downloading the packages from the Internet. But I have already those packages stored in my hard disk.

Even when I double click a deb life, installation fail.

PS: last time i found on internet a guy suggested some changes in "software sources". I forgot what changes but it worked then


----------



## Liverpool_fan (Jun 8, 2011)

*Re: Ubuntu package installation help*

Is your APT been interrupted? In that case apt-get -f will fix the problem.

If the PC is connected, post the output of any apt-get to debug.


```
sudo apt-get install screen
```

Post the output. Make sure you enclose them in [NOPARSE]
	
	



```

```
[/NOPARSE] tags.

For offline installation of packages, check out *askubuntu.com/questions/974/how-can-i-install-software-offline


----------



## utkarsh009 (Jun 8, 2011)

*Re: Ubuntu package installation help*

these steps may help :

1. try sudo apt-get update.
2. next time backup everything in /var/cache/apt.  for now you can add those repositories (if other than default) from which you downloaded.
3. it may have unmet dependencies. so you may wanna try downloading the tarball.


----------



## abhijangda (Jun 8, 2011)

*Re: Ubuntu package installation help*

One of the problems, will be that you may have dependencies, which can only be downloaded from internet through repositories or you may have dependencies which are not present in repositories, post the error message.


----------



## bubusam13 (Jun 9, 2011)

*Re: Ubuntu package installation help*



utkarsh009 said:


> these steps may help :
> 
> 2. next time backup everything in /var/cache/apt.  for now you can add those repositories (if other than default) from which you downloaded.



@all... this is what I have done.... I have backup-ed the complete apt folder. This is the reason I cant understand why installation fails.

*E: Could not get lock /var/lib/dpkg/lock - open (11: Resource temporarily unavailable)
E: Unable to lock the administration directory (/var/lib/dpkg/), is another process using it?
*


This is what i m getting


----------



## krishnandu.sarkar (Jun 9, 2011)

*Re: Ubuntu package installation help*

Well, restart your OS.

Alternatively you can do a ps -e and kill the process.


----------



## utkarsh009 (Jun 9, 2011)

*Re: Ubuntu package installation help*



krishnandu.sarkar said:


> Well, restart your OS.
> 
> Alternatively you can do a ps -e and kill the process.



+1 restart your os


----------



## bubusam13 (Jun 9, 2011)

*Re: Ubuntu package installation help*

I just solve it.
On terminal I typed
sudo apt-get update

Took some seconds to update and solved... don't know whats actually happened but it solved


----------



## utkarsh009 (Jun 9, 2011)

*Re: Ubuntu package installation help*

@op: yup i already told you that. maybe you didn't pay attention to my words. anyways i am glad i was able to help.


----------



## bubusam13 (Jun 9, 2011)

*Re: Ubuntu package installation help*

I paied much attention to your second line. I reloaded info in synaptic package manager. I thaught it will do? anyway, can u tell me what this actually does, apt-get update. what apt-get is ?


> next time backup everything in /var/cache/apt. for now you can add those repositories (if other than default) from which you downloaded.


----------



## krishnandu.sarkar (Jun 9, 2011)

*Re: Ubuntu package installation help*

aptitude is the package manager, apt-get is same.

apt-get update updates the repository and fetch if any update is available on installed apps.


----------



## bubusam13 (Jun 9, 2011)

*Re: Ubuntu package installation help*

Thanku


----------



## krishnandu.sarkar (Jun 9, 2011)

*Re: Ubuntu package installation help*

No sorry, apt-get update just updates the repository, apt-get upgrade does the update 

Silly mistake.


----------



## sygeek (Jun 9, 2011)

*Re: Ubuntu package installation help*



> E: Could not get lock /var/lib/dpkg/lock - open (11: Resource temporarily unavailable)
> E: Unable to lock the administration directory (/var/lib/dpkg/), is another process using it?


Happens when a process is using apt-get in the background. In your case, it was the synaptic package manager, but it failed.

Either you can kill the process PID, the synaptic package manager in this case.
_OR_
Use this command:


> sudo rm /var/lib/dpkg/lock




To install a deb package use this command in the terminal:


> sudo dpkg -a ~/package/path


----------



## bubusam13 (Jun 9, 2011)

*Re: Ubuntu package installation help*

Thanku all for sharing your knowledge. i'm bookmarking this page


----------



## krishnandu.sarkar (Jun 9, 2011)

*Re: Ubuntu package installation help*

Ok, closing and marking it as [SOLVED]


----------

