Missing RPM Dependencies

Hello Everyone,

When I run the command rmp -Va a massive list of dependencies are missing. I need helping solving this problem.

for example:

missing d /usr/share/doc/source-highlight/Hello.java
missing /usr/share/javascript/mathjax/fonts/HTML-CSS/TeX/png/SansSerif/Italic/060/03A0.png
Is this really a dependency?

Where do I get the packages, also can someone please tell what some of these mean?

.......T.    /boot/efi/EFI/fedora/gcdia32.efi
.......T.    /boot/efi/EFI/fedora/gcdx64.efi
.M.......    /boot/efi/System
.M.......    /boot/efi/System/Library
.M.......    /boot/efi/System/Library/CoreServices
.M.......    /boot/efi/System/Library/CoreServices/SystemVersion.plist
.M.......    /boot/efi/mach_kernel
..5....T.  c /etc/tor/obfs4.torrc
S.5....T.    /usr/bin/obfs4proxy
S.5....T.  c /etc/texlive/web2c/updmap.cfg
.M.......  g /usr/share/texlive/texmf-dist/web2c/fmtutil.cnf
....L....  c /etc/pam.d/fingerprint-auth
....L....  c /etc/pam.d/password-auth
....L....  c /etc/pam.d/postlogin
....L....  c /etc/pam.d/smartcard-auth
....L....  c /etc/pam.d/system-auth
..5....T.    /usr/lib64/python3.10/__pycache__/os.cpython-310.pyc
..5....T.    /usr/lib64/python3.10/__pycache__/site.cpython-310.pyc
..5....T.    /usr/lib64/python3.10/__pycache__/stat.cpython-310.pyc
.M.......  c /etc/locale.conf
S.5....T.  c /etc/systemd/resolved.conf
.M.......  g /etc/udev/hwdb.bin
.M.......  c /etc/vconsole.conf
.M.......  g /var/lib/systemd/random-seed
missing     /run/gluster/metrics
.M....G..    /var/log/gdm
S.5....T.  c /etc/cups/cups-browsed.conf
.M.......  g /run/thermald/thermald.pid
SM5....T.  c /var/lib/pgsql/.bash_profile

Finally if I updated to fedora 36 when a stable version is released would that resolve this problem?

Thank you,
Luca

Gnome Software broken

The codes are listed here for example.

Code Meaning
S File size differs.
M File mode differs.
5 The MD5 checksum differs.
D The major and minor version numbers differ on a device file.
L A mismatch occurs in a link.
U The file ownership differs.
G The file group owner differs.
T The file time (mtime) differs.

If you’ve changed a file, then a 5 and a T are expected. It seems odd that a few have a M(ode) change. The Python ones can be fixed by reinstalling python3.10. The rest are not particularly trouble. So if something is broken, it’s one of the missing files you didn’t post a list of.

4 Likes

This should make other issues okey sudo dnf distro-sync

Yes it will solve all issues
And we really appreciate that you are excited about our latest fedora 36 release
Unfortunately it is still months away you can find the approximate dates here
https://fedorapeople.org/groups/schedule/f-36/f-36-key-tasks.html
Please wait for. :fedora:36 it will be awesome release with gnome 42 and other DEs

1 Like

I don’t think so. distry-sync only looks for package versions as far as I know. It does not check the integrity of the installed packages.

It may, but it may not. It may because all packages should be updated, and so whatever files are missing will be replaced by newer ones. But any broken packages that are not touched by the upgrade will remain broken.

You can reinstall the packages by asking dnf to reinstall the missing files. I.e., you don’t need to figure out what package the file came from explicitly to use dnf:

sudo dnf reinstall /usr/share/doc/source-highlight/Hello.java
Dependencies resolved.
========================================================================================================================================
 Package                               Architecture                Version                            Repository                   Size
========================================================================================================================================
Reinstalling:
 source-highlight                      x86_64                      3.1.9-11.fc35                      fedora                      691 k

Transaction Summary
========================================================================================================================================

Total download size: 691 k
Installed size: 3.1 M
Is this ok [y/N]:

This is because you deleted a lot of javascript files while manually deleting java files, as noted in your other thread.

1 Like

I think to get rid of this mess just reinstall the os and you will be absolutely fine now the issue issue you even don’t know what are the files you have deleted unknowingly so you will face many issue sometimes some apps will work sometimes some will not. And you have to install this small stuff so the easy way t
Is just reflash the os.

Else you need to see everytime something broken due to missing files install them with dnf reinstall path*
And after 4-5time it will be resolved

1 Like

And i don’t know that if dnf can do this like list out all dependencys in system and compare it with the server and make them replaced. If it is possible maybe i don’t know.

1 Like

I don’t see a verify command in the dnf man page, so I’m afraid it does not seem to have this function. So, yeh, I guess checking with rpm, then reinstalling packages until the errors go away is the way to go here. Could probably be scripted to make it easier.

For example:

sudo rpm -Va | grep missing | tr -s ' ' | cut -d ' ' -f 3 > missingfiles.txt

will give you a list of all files marked missing. You can go through this and remove unimportant files (any files with .build-id, for example are debuginfo files and you can ignore them).

Then, when you have your list, you can tell dnf to reinstall all these files at once with something like:

sudo cat missingfiles.txt | xargs dnf reinstall
2 Likes

This is a good thing to have. this should be a feature request maybe in future and this will make system so called linus proof.

1 Like

Sure, you can file an RFE with dnf and see what the maintainers say. It’s quite a limited use case though, so it may not be high priority for the devs when there’s so much other work to do.

Hi,

  • For /boot/efi/* you could check this Fedora wiki on part Instructions for UEFI-based systems. There some packages to install to repair it.
  • For the other things there, you can try by reinstall systemd package. It include lot of packages that look like related with your other missing packages like pam, random-seed, resolved, etc.

If after reinstall systemd, if you still get the messages, here some cross check compared to my system.

  • For /etc/pam/* here some packages I have from my system (Fedora Workstation) that maybe you want to try to reinstall pam, systemd-pam, gnome-keyring-pam, fprintd-pam, pam_afs_session, and pam_passwdqc.
  • For /etc/systemd/resolved.conf you can try with reinstalling systemd-resolved.
  • For /etc/udev/* you can try with systemd-udev, libgudev.
  • For python, not sure. There lots of packages that usually comes with python things.
1 Like

In the past I have done sudo dnf reinstall \* and it does a complete reinstall of every package currently installed. That should fix the problems with missing files that you have manually removed. YMMV

3 Likes

Hello,

What do you think about a script that compares / refreshes the fedora os dependencies packages. I’m sure I am not the first person on linux who accidentally ruined there linux os. Just an idea.

Hey Jeff,

Will this ruin some existing packages in anyway?

There are unfortunately too many ways one can ruin a Linux installation. In your case, you know that you removed system files, and luckily this did not break dnf and rpm, so reinstalling the packages should fix it.

If dnf and/or rpm break, the simplest solution is to reinstall the OS—the nuclear option. Fixing this by hand is usually very hard, and takes much more time than a reinstall.

In your case, the big hammer is dnf reinstall \*, which reinstalls all packages, without checking to see if they need to be reinstalled. This will take some bandwidth and some time too (and requires enough space for all your packages to be downloaded).

The smaller hammer, the more intelligent solution, is to verify your packages and only reinstall ones that need to be reinstalled.

In cases where users have modified or added files to the system directories, this gets a lot more complex. reinstalling won’t help because rpm/dnf do not know about the extra files (theyre not in the database!), and cannot remove them. It needs to be done manually by the user, and unless the user remembers what they did and what files were installed, this usually cannot be undone. Only the nuclear option works here.

So while theoretically a script that is smart enough to handle all of this can be written, practically, it’s quite a hard task, and I don’t think it’s worth the effort it’ll take. It’s much better/easier to treat each case individually because it helps us discuss the issue with users and we all get to learn new things/lessons (like—don’t touch system files without using dnf/rpm).

3 Likes

Yes i agree just use as it is and when ever you face some apps are not opening just install that with dnf to the path it is missing i hope thare are not lots of package missing if so then you could not have able to use anything just wait and try opening all apps see which opens and and not opens and install those just you will be fine no issues.

1 Like

Unfortunately, with the way that some packages have several dependencies, this is not as simple as you make it sound. Your approach will work, but only if the user reviews all the dependencies for the failing app then does a reinstall of all the dependencies for that app as well. It could be difficult to actually determine which of the involved packages (the app or its dependencies) actually is causing the failure.

On my system, which has a lot more packages than the average, my suggestion to do a reinstall of everything would result in a download of just under 4 GB of packages with the total once installed at just under 8 GB. The minimum available space needed to do the download and reinstall would be about 4 to 5 GB.

2 Likes

Okey and i think the easiest way is just take a backup of the all files and i hope have the iso and flash again and update and don’t delete any package without knowledge easy. What you have suggested is also good no doubt. It is actually depending on the users knowledge and ability.
This 3of the option all are good just choose that option that suitable for you.

1 Like

The big hammer solved my problem, after using the script you provided the output of Sudo rpm -Va did not copy into missing files.txt. I do have a lot of available space on my ssd and hard drive to accommodate for the big hammer although I wonder, do I have each file downloaded twice on my computer now technically using double the space, or did it remove the old files.

When installing with dnf, you’ll only have one copy of the file. Try dnf clean packages to clean the packages that it downloaded in the cache, and that should free up some space.

1 Like