LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 09-03-2022, 07:32 AM   #1
Jamie Myers
LQ Newbie
 
Registered: Sep 2022
Posts: 2

Rep: Reputation: 0
Question Check dependencies with bash script or a tool


Hello. I broke my Desktop Environment few months ago after a system upgrade. The Desktop Environment broke because I installed some drivers for games and also some ppa. I fixed some of the problems by updating and reinstalling some system inbuild packages, removing unwanted ppa, dpkg commands, synaptic manager. But Some application and system panel still works wired sometimes(eg:when I press start button, application list popups but If press start button again, it doesn't go back). I am looked at dependencies of important packages in the linux system( eg: cryptsetup) and installed it. When I update my repo, apt shows : some packages are held back. So I installed those packages manually.

Is there any script , tool or one single command which help me fixing the dependency problem ? I want to make sure that the dependencies of important packages are installed on the system.
 
Old 09-03-2022, 09:52 AM   #2
wpeckham
LQ Guru
 
Registered: Apr 2010
Location: Continental USA
Distribution: Debian, Ubuntu, RedHat, DSL, Puppy, CentOS, Knoppix, Mint-DE, Sparky, VSIDO, tinycore, Q4OS, Manjaro
Posts: 5,714

Rep: Reputation: 2734Reputation: 2734Reputation: 2734Reputation: 2734Reputation: 2734Reputation: 2734Reputation: 2734Reputation: 2734Reputation: 2734Reputation: 2734Reputation: 2734
It might help to know what distribution you are running, what version, with what desktop, and some idea of what exactly you installed and how, removed and how, and why.
As stated, your question gives us nowhere to start considering the situation.
 
Old 09-03-2022, 11:24 AM   #3
DavidMcCann
LQ Veteran
 
Registered: Jul 2006
Location: London
Distribution: PCLinuxOS, Salix
Posts: 6,146

Rep: Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314
I'd echo the last post! Actually, it looks like you are using Ubuntu. If that's the case, searching for fixing apt problems in Ubuntu leads to pages like these:
https://phoenixnap.com/kb/ubuntu-fix-broken-packages
https://askubuntu.com/questions/1231...s-ubuntu-20-04
There may be something helpful in those, for example.
 
Old 09-03-2022, 12:54 PM   #4
Debian6to11
Member
 
Registered: Jan 2022
Location: Limassol, Cyprus
Distribution: Debian
Posts: 382
Blog Entries: 1

Rep: Reputation: 71
I will just add that if you install packages using dpkg you may end up with dependency problems because dpkg does not install dependencies. If you want to use dpkg you better know what you are doing.

It is way easier to use apt as it installs all the required dependencies.
When apt says that some packages have been kept back, it means that you have altered the version of packages and apt cannot solve their dependencies or versions of the required packages.

And try to keep your repository as minimal as possible.
 
2 members found this post helpful.
Old 09-04-2022, 03:41 PM   #5
tercel
Member
 
Registered: Aug 2022
Posts: 54
Blog Entries: 23

Rep: Reputation: 0
Question

Quote:
Originally Posted by Debian6to11 View Post
And try to keep your repository as minimal as possible.
I read your post and since I do not know well enough I want to ask a question about your answer. Can I ask a reason what happens otherwise or simply what is the disadvantage of having a lot of repositories? Isn't it good to keep more to get? Because if the one did not have the package you need, the other one may have?

Last edited by tercel; 09-04-2022 at 03:42 PM. Reason: change notification option
 
Old 09-04-2022, 06:44 PM   #6
wpeckham
LQ Guru
 
Registered: Apr 2010
Location: Continental USA
Distribution: Debian, Ubuntu, RedHat, DSL, Puppy, CentOS, Knoppix, Mint-DE, Sparky, VSIDO, tinycore, Q4OS, Manjaro
Posts: 5,714

Rep: Reputation: 2734Reputation: 2734Reputation: 2734Reputation: 2734Reputation: 2734Reputation: 2734Reputation: 2734Reputation: 2734Reputation: 2734Reputation: 2734Reputation: 2734
Quote:
Originally Posted by tercel View Post
I read your post and since I do not know well enough I want to ask a question about your answer. Can I ask a reason what happens otherwise or simply what is the disadvantage of having a lot of repositories? Isn't it good to keep more to get? Because if the one did not have the package you need, the other one may have?
If I might step in: the distribution repositories are carefully managed so that there are no collisions and few (if any) cross dependency traps. Some external repos are managed as carefully, but there is no lock on that just good practice. If you add a non-distribution repo that has a collision package or a dependency cross you can mess up your installation by doing a simple software update. Same with to many installations form source. The more complications you add to the package tracking the better the chance of making it fail.

Best is to keep it simple, restricted to the distribution repos only. If you must add one (and don't we all at one time or another) the best things is to keep it to very few and remove them if they are no longer needed.

The more potential single points of failure you add to the system, the greater the chance that you will trip over one. Simple is just more reliable.

If you like excitement, go ahead any way you want: but in that case regular backups become even more critical.
 
1 members found this post helpful.
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] bash function to check if script dependencies are installed... masavini Programming 6 11-05-2017 05:43 AM
[SOLVED] Bash script to check if file is present or not, check periodically every 30 mins Iyyappan Linux - Server 10 07-03-2013 05:19 AM
Partition check, check double check Vincentius Linux - General 0 12-25-2004 05:47 AM
Boot disk; check. CD in drive; check. Doesn't work; check. Hal DamnSmallLinux 7 02-04-2004 02:10 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 10:01 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration