Zend certified PHP/Magento developer

Undefined symbols, mixing repositories, linux integrity, and fixing a whole distribution

Having this issue by trying to update / upgrade to Bookworm, led me to some thoughts about the integrity of linux, as distributions / repositories increasing and thus libraries may diverse enough to create severe problems to a simple user.

 /usr/libexec/gvfsd-trash: symbol lookup error: /usr/libexec/gvfsd-trash: undefined symbol: g_unix_mount_point_at
  1. I had in my source list different repositories, and some old ones eg. Ubuntu, debian, and many older flavours of them.
  2. I didnt know that I must not mixed them (i chose force option and to overwrite files)
  3. By deleting the older ones and ubuntu repositories, by executing `sudo apt upgrade’ a lot of packages were ready to be installed (!!!) that before were unavailable. why?
  4. This created glibc, gvfs, systemd severe conflicts in my system and a lot of undefined symbols
  5. Note that I deleted almost as a whole /usr/local and /usr/libexec folders. and reinstalled almost everything sudo apt install --reinstall package. This fixed many undefined errors but not gvfs undefined errors and libsystemd-252.so in shutdown.

So, my thoughts:

  1. Why linux does not prohibit or even detect that you have conflicting repositories?
  2. I thought linux has a great interconnectivity between “similar editions”.
  3. I thought that libraries “include” everything for every related repository and each flavour simply choose which “functions” to call.
  4. why does not exist sudo apt install --fix-upgrade debian-bookworm ?

My questions:

  1. How linux detect which version of a specific library to be installed?
  2. This should not follow the “main” flavour? I know that self-made flavours or optimizations may exists but from the point of view of a user?
  3. So in my case, debian developers told me “good luck with that mess in irq channel”. However, they gave me some useful info.
  4. So, in my case, what dictates that this “version of gvfs” will be installed which produce these undefined symbols?
  5. Why linux dont print a message “you have these libraries that are not tested for bookworm?” or “you have these libraries that are higher / lesser version of bookworm flavor?” or sudo apt --fix-libraries for bookworm?

I have installed bookworm in a very new system and all goods. I am thinking to copy almost the whole /usr/ folder into the older machine. This will do the trick?