Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

Last night my system(Ubuntu 12.04) was crashed, and I had to install the Ubuntu 12.04 again. Actually I have "/var/cache/apt/archives", that it's for my previous OS ,but when I wrote this command as a root user :

sudo dpkg -i /var/cache/apt/archives/*deb

After several times show me this error :

system halted because there were too many errors...

and my Ubuntu didn't boot again, so I installed it again, now how to use /var/cache/apt/archives and is there any way to handle this problem please ?

share|improve this question
    
You want to install all the packages of your previous installation, right? –  tuxtu Dec 6 '12 at 14:55
    
@uzumaki: exactly, it's about 800Mb and my Internet speed is very low :( –  Sam Dec 6 '12 at 14:56
1  
When you are putting this command in your new installation, it's pointing to the archives of new installation. Just show the folder from terminal and give the command to install all the packages it has in it. I think that'll solve your problem. –  tuxtu Dec 6 '12 at 15:04
    
Possible duplicate of using .deb packages in /var/cache/apt/archives , have a look. –  NikTh Dec 6 '12 at 15:17

3 Answers 3

up vote 1 down vote accepted

I'll answer you in simple example,

suppose appA have dependencies depA1v1.1 and depA2v1.5

suppose appB have dependencies depB1v1.3 and depA2V1.3

Now appA is install in Pc#1 and appB installed in PC#2.

When you just take a copy of all *.deb from PC#1 /var/cache/apt/archives and move it to PC#2 and then you make dpkg -i *.deb. What happens?

Now in PC#2 you would have installed appA correctly but appB would have problems, why then?

simply because you have incompatible dependency since depA2 is of version 1.5 now not 1.3 as needed.

Hope this explains the problem, now then how could I use those archives?!

  • Either you have to take care of your dependencies and check whether those *.debs would make problems for your system and this is exhausting job
  • Or, you should always be same in the two hosts, so whenever you update PC#1 you should take the *.deb to PC#2 and do the same update, so the two hosts would always be synced with respect to app versions.

Hint: A handy use of those debs is just copy them from Pc#1 to PC#2 and move them to /var/cache/apt/archives in Pc#2.

Now try to install apps you want from these archives using regular apt-get and not dpkg, so apt-get tries to resolve dependencies from those archives if founded and check updates, so if there is no new update on the repositories, then it would use the .deb founded in the path /var/cache/apt/archives

share|improve this answer

http://people.adams.edu/~cdmiller/posts/Ubuntu-dpkg-recovery/

This might help point you in the right direction. It looks like you'll have to re-install apt and then force the system to re-install the apps that it thinks it can.

share|improve this answer
    
thnx for your help .... –  Sam Dec 6 '12 at 20:19

Here error occured due to lack of dependancies, dpkg -i *.deb is dangerous If necessory dependancies are not satisfied, So I would like to suggest local repository or an aptoncd image to use such debs

share|improve this answer
    
thnx, how to define "/var/cache/apt/archives" as local repository please ?and I don't know what is "aptoncd image"? which is better? –  Sam Dec 6 '12 at 15:15

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.