Thursday, April 25, 2024
 Popular · Latest · Hot · Upcoming
1
rated 0 times [  1] [ 0]  / answers: 1 / hits: 2814  / 3 Years ago, tue, august 3, 2021, 5:37:23

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 ?


More From » 12.04

 Answers
4

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


[#33830] Thursday, August 5, 2021, 3 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
ideobedi

Total Points: 121
Total Questions: 108
Total Answers: 107

Location: United States Minor Outlying Island
Member since Sat, May 28, 2022
2 Years ago
;