No such file or directory @ realpath_rec

ishtar

New Member


Messages: 8

#1
Hello,

Been having this issue and cant seem to figure out how to fix it. I've seen this thread but clearing
Code:
/usr/local/lib/compat/pkg
doesn't resolve the issue. For example, I just emptied it, used portupgrade to update dehydrated, and after it's completed I get the following:
Code:
===>  Cleaning for dehydrated-0.6.2_1
--->  Cleaning out obsolete shared libraries
No such file or directory @ realpath_rec - /usr/local/lib/compat/pkg/libXaw7.so.7
No such file or directory @ realpath_rec - /usr/local/lib/compat/pkg/libmysqlclient.so.20
Any idea how to get rid of these?

Thank you
 

ShelLuser

Son of Beastie

Thanks: 1,484
Messages: 3,252

#2
What exact command(s) did you use to upgrade? Also: have you been mixing ports and packages perhaps? So, at one moment you run pkg install <stuff> while in the other you're using portupgrade?
 
OP
OP
I

ishtar

New Member


Messages: 8

#3
Thanks for the reply. Today I ran the following:
portupgrade -rRf vlc

Once it was done, I could see:
Code:
--->  Cleaning out obsolete shared libraries
No such file or directory @ realpath_rec - /usr/local/lib/libXaw7.so.7.0.0
No such file or directory @ realpath_rec - /usr/local/lib/libXaw7.so.7.0.0
No such file or directory @ realpath_rec - /usr/local/lib/mysql/libmysqlclient.so.20
I even tried to symlink the files to that directory, but the link appears to vanish during the process somewhere.

As far as I know, I haven't (even accidentally) installed any packages using the pkg utility. Is there a way to trace that?


Edit:
Last night, I ran the following: portupgrade -frR apache24 freetype2

And got the following:
Code:
No such file or directory @ realpath_rec - /usr/local/lib/libvpx.so.5.0.0
No such file or directory @ realpath_rec - /usr/local/lib/compat/pkg/db5
No such file or directory @ realpath_rec - /usr/local/lib/compat/pkg/db5
No such file or directory @ realpath_rec - /usr/local/lib/compat/pkg/libXaw6.so.6
No such file or directory @ realpath_rec - /usr/local/lib/compat/pkg/db5
No such file or directory @ realpath_rec - /usr/local/lib/compat/pkg/db5
No such file or directory @ realpath_rec - /usr/local/lib/compat/pkg/db5
No such file or directory @ realpath_rec - /usr/local/lib/libXaw7.so.7.0.0
No such file or directory @ realpath_rec - /usr/local/lib/compat/pkg/db5
No such file or directory @ realpath_rec - /usr/local/lib/libXaw7.so.7.0.0
No such file or directory @ realpath_rec - /usr/local/lib/mysql/libmysqlclient.so.20
 

trev

Aspiring Daemon

Thanks: 115
Messages: 622

#5
Bump? Can anyone help?
Maybe, I had the same problem on my rpi2:

Code:
===>  Cleaning for ca_root_nss-3.37.3
--->  Cleaning out obsolete shared libraries
No such file or directory @ realpath_rec - /usr/local/lib/compat/pkg/db5/libdb-5.3.so.0
No such file or directory @ realpath_rec - /usr/local/lib/compat/pkg/db5/libdb_cxx-5.3.so.0
No such file or directory @ realpath_rec - /usr/local/lib/compat/pkg/db5/libdb_stl-5.3.so.0
No such file or directory @ realpath_rec - /usr/local/lib/compat/pkg/db5/libdb-5.3.so.0
No such file or directory @ realpath_rec - /usr/local/lib/compat/pkg/db5/libdb_cxx-5.3.so.0
No such file or directory @ realpath_rec - /usr/local/lib/compat/pkg/db5/libdb_stl-5.3.so.0
I tried deleting db5 and reinstalling, to no effect.

The library files listed above are not in the db5 directory, but the directory above that. I deleted the files from /usr/local/lib/compat/pkg and all was well.

Have you checked your /usr/local/lib/compat/pkg/ directory?
 
OP
OP
I

ishtar

New Member


Messages: 8

#6
Thanks, but that's the first thing I tried. Deleted the entire /usr/local/lib/compat/pkg directory but the problem remains.
 

trev

Aspiring Daemon

Thanks: 115
Messages: 622

#7
Let me get this right. You deleted /usr/local/lib/compat/pkg and you are still getting messages referring to that directory even though it doesn't exist?

My only other suggestion is to find one of the files being referred to and delete it (or maybe just rename it until you are certain there are no unexpected consequences). That's how I found the files in my case which were not in the directory being complained about, but the directory above.
 
OP
OP
I

ishtar

New Member


Messages: 8

#8
Well I had other ports-related issues and decided to just reinstall everything.

I deleted /usr/ports/
Looped through pkg to uninstall everything
Then wiped /var/db/pkg
And finally reinstalled ports I needed.

Everything is solved now. Whatever it was, I know the actions taken were drastic, but the end result is the issue is no longer happening.

Edit: Spoke too soon. Updated pkg, and the problem is back.

Code:
===>  Cleaning for pkg-1.10.5_1
--->  Cleaning out obsolete shared libraries
No such file or directory @ realpath_rec - /usr/local/lib/compat/pkg/db5
No such file or directory @ realpath_rec - /usr/local/lib/compat/pkg/db5
No such file or directory @ realpath_rec - /usr/local/lib/compat/pkg/db5
No such file or directory @ realpath_rec - /usr/local/lib/compat/pkg/db5
No such file or directory @ realpath_rec - /usr/local/lib/compat/pkg/db5
No such file or directory @ realpath_rec - /usr/local/lib/compat/pkg/db5
No such file or directory @ realpath_rec - /usr/local/lib/gcc49
So I'm 100% sure the problem is the pkg package. No clue what to do anymore.
 

Bubrak

New Member

Thanks: 5
Messages: 8

#10
Hi,

I have same issue, dont know what to do and cannot find any solution on internet. After each usage of portupgrade it finishes with this, and in time it is getting longer and longer. At first there was just the last line with libmysqlclient.so.20, but now there are 9 lines after some period (maybe 4-5 months ago it started to do this).

Code:
===>  Cleaning for jpeg-turbo-2.0.0
--->  Cleaning out obsolete shared libraries
No such file or directory @ realpath_rec - /usr/local/lib/compat/pkg/db5
No such file or directory @ realpath_rec - /usr/local/lib/compat/pkg/db5
No such file or directory @ realpath_rec - /usr/local/lib/compat/pkg/libXaw6.so.6.0.1
No such file or directory @ realpath_rec - /usr/local/lib/compat/pkg/libXaw7.so.7.0.0
No such file or directory @ realpath_rec - /usr/local/lib/compat/pkg/db5
No such file or directory @ realpath_rec - /usr/local/lib/compat/pkg/db5
No such file or directory @ realpath_rec - /usr/local/lib/compat/pkg/db5
No such file or directory @ realpath_rec - /usr/local/lib/compat/pkg/db5
No such file or directory @ realpath_rec - /usr/local/lib/compat/pkg/libmysqlclient.so.20
Thank you for any help.
 

trev

Aspiring Daemon

Thanks: 115
Messages: 622

#11
Code:
/usr/local/lib/compat/pkg/
As I understand it, this directory holds "old" libraries some of which may be in use by a port or ports which you have installed but not updated. pkg moves those "old" libraries here so that a port/ports may still find them and work.

So long as you recompile your ports AND their dependancies (both those which rely on the port AND those which are required by the port) , you can safely delete the libraries in this directory.

I don't understand why pkg started having this issue though as it never used to occur.
 

Bubrak

New Member

Thanks: 5
Messages: 8

#12
Hi Trev,

thank you for some ideas. I've found also that in that directory are soft links with non existent targets and that may be the issue.

i.e. libmysqlclient_r.so.20 -> libmysqlclient.so.20 which should be causing this line:
Code:
No such file or directory @ realpath_rec - /usr/local/lib/compat/pkg/libmysqlclient.so.20
as libmysqlclient.so.20 is not present

there are also several links to db5/<something> when folder db5 is not present

I deleted link libmysqlclient_r.so.20 -> libmysqlclient.so.20 and will see what will happen in next portupgrade usage.

But anyway still there is the issue about creating these incorrect links.

Thank you, best regards
 

Bubrak

New Member

Thanks: 5
Messages: 8

#13
Hi all,

so after deleting all links with missing targets, portupgrade is not writing those lines anymore.

But still there remains issue with pkg which creates these links or deletes targets of these links with no cleanup after that. Will track this behaviour further.

Code to delete all corrupted links here:
Code:
# change folder
cd /usr/local/lib/compat/pkg
# print dangling links
find . -type l -exec test ! -e {} \; -print
# delete dangling links
find . -type l -exec test ! -e {} \; -delete
Thanks, best regards
 

trev

Aspiring Daemon

Thanks: 115
Messages: 622

#14
I suspect the issue is pkg creates the soft links, but portupgrade deletes the library files and knows nothing about pkg and its soft links and so doesn't clean them up. Might have to lodge a PR against portupgrade to get it to check in /usr/local/lib/compat/pkg/. Or write a script to check the soft links and delete if no file found. Hmmm.
 

jrronimo

New Member

Thanks: 1
Messages: 10

#15
Hi all,

so after deleting all links with missing targets, portupgrade is not writing those lines anymore.

But still there remains issue with pkg which creates these links or deletes targets of these links with no cleanup after that. Will track this behaviour further.

Code to delete all corrupted links here:
Code:
# change folder
cd /usr/local/lib/compat/pkg
# print dangling links
find . -type l -exec test ! -e {} \; -print
# delete dangling links
find . -type l -exec test ! -e {} \; -delete
Thanks, best regards
I ran into this problem recently as well -- that little script seems to have fixed it though. Thanks!
 
Top