Score:2

How to repair broken symbolic links

lb flag

The system is using Kubuntu 20.04.1 fully updated.

I am currently trying to get an old O.U. Sense board (an SBC) up and running. I have managed to install the software for its Scratch/Squeak based IDE. However when I try to run the ide it does not run. On issuing the ldd command and piping its output into grep the system displays the following output.

kub@kub-SATELLITE-L870-18V:~$ ldd /usr/lib/Sense/*Plugin | grep 'not found'
/usr/lib/Sense/CurlPlugin: /lib/i386-linux-gnu/libcurl.so.4: version `CURL_OPENSSL_3' not found (required by /usr/lib/Sense/CurlPlugin)
        libssl.so.0.9.8 => not found
        libssh2.so.1 => not found
        libcrypto.so.0.9.8 => not found
        libasound.so.2 => not found
        libpangocairo-1.0.so.0 => not found
        libpango-1.0.so.0 => not found
        libcairo.so.2 => not found
        libgobject-2.0.so.0 => not found
        libgmodule-2.0.so.0 => not found
        libglib-2.0.so.0 => not found
kub@kub-SATELLITE-L870-18V:~$ 

I have found that, from file libssh2.so.1 downwards shown in the list above, all of these files exist on the system within /usr/lib/x86_64-linux-gnu. I thought that to get the ide running it would simply be a case of moving the required library files up one level to /usr/lib. I did this with (link file) libssh2.so.1 and (non-link file) libssh2.so.1.0.1 to which the first file links.

Using Dolphin within /usr/lib/x86_64-linux-gnu I see that the file icon for the link file has a chain link sub-icon in its bottom right corner. However in /usr/lib Dolphin shows the file icon for the link file without its chain link sub-icon.

In Konsole, when I enter ls -l within /usr/lib/x86_64-linux-gnu I find the following.

lrwxrwxrwx  1 root root        16 Aug 10  2020 libssh2.so.1 -> libssh2.so.1.0.1

This clearly shows that the linkage is present. When the same command is issued within /usr/lib the following is shown.

-rw-r--r--   1 root root  186856 Sep 16 10:50 libssh2.so.1
-rw-r--r--   1 root root  186856 Sep 16 10:51 libssh2.so.1.0.1

It can be clearly seen that the linkage has been removed. How do I restore the linkage between these two files within /usr/lib ?

UPDATE: I am now even more uncertain as to how to proceed having just read https://dmerej.info/blog/post/symlinks-and-so-files-on-linux/

As you can see from the top list I will need to repeat the same process for a number of other library (link and non-link) files so any help would be very much appreciated.

Best regards,

Stuart

hr flag
If you are trying to run a 32-bit application (as suggested by `/lib/i386-linux-gnu/libcurl.so.4`) then linking the 64-bit libraries is unlikely to help, I think?
user10489 avatar
in flag
You are fixing the wrong problem. Just because the filename matches doesn't mean it is the right file. Moving stuff around like that is likely to break your system.
user10489 avatar
in flag
Try using the `file` command on the libraries and check if the architecture matches.
N0rbert avatar
zw flag
These are not broken symbolic links, these are broken library linkage. What is CurlPlugin? From where it was downloaded? Please make your question more reproducible. Also note that 20.04.1 is not the latest version.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.