Seems like the libc.dylib is removed on macOS BigSur.
When you use trash-empty or trash-restore, the following OSError will be raised.
Traceback (most recent call last):
File "/usr/local/bin/trash-empty", line 5, in <module>
sys.exit(main())
File "/usr/local/Cellar/trash-cli/0.17.1.14_4/libexec/lib/python3.9/site-packages/trashcli/cmds.py", line 29, in empty
return EmptyCmd(
File "/usr/local/Cellar/trash-cli/0.17.1.14_4/libexec/lib/python3.9/site-packages/trashcli/empty.py", line 48, in run
parse(argv)
File "/usr/local/Cellar/trash-cli/0.17.1.14_4/libexec/lib/python3.9/site-packages/trashcli/trash.py", line 110, in __call__
self.default_action()
File "/usr/local/Cellar/trash-cli/0.17.1.14_4/libexec/lib/python3.9/site-packages/trashcli/empty.py", line 83, in empty_all_trashdirs
trashdirs.list_trashdirs()
File "/usr/local/Cellar/trash-cli/0.17.1.14_4/libexec/lib/python3.9/site-packages/trashcli/trash.py", line 151, in list_trashdirs
self._for_each_volume_trashcan()
File "/usr/local/Cellar/trash-cli/0.17.1.14_4/libexec/lib/python3.9/site-packages/trashcli/trash.py", line 157, in _for_each_volume_trashcan
for volume in self.mount_points():
File "/usr/local/Cellar/trash-cli/0.17.1.14_4/libexec/lib/python3.9/site-packages/trashcli/list_mount_points.py", line 5, in mount_points
return list(mount_points_from_getmnt())
File "/usr/local/Cellar/trash-cli/0.17.1.14_4/libexec/lib/python3.9/site-packages/trashcli/list_mount_points.py", line 10, in mount_points_from_getmnt
for elem in _mounted_filesystems_from_getmnt():
File "/usr/local/Cellar/trash-cli/0.17.1.14_4/libexec/lib/python3.9/site-packages/trashcli/list_mount_points.py", line 57, in _mounted_filesystems_from_getmnt
libc = cdll.LoadLibrary(libc_name)
File "/usr/local/Cellar/python@3.9/3.9.0_1/Frameworks/Python.framework/Versions/3.9/lib/python3.9/ctypes/__init__.py", line 452, in LoadLibrary
return self._dlltype(name)
File "/usr/local/Cellar/python@3.9/3.9.0_1/Frameworks/Python.framework/Versions/3.9/lib/python3.9/ctypes/__init__.py", line 374, in __init__
self._handle = _dlopen(self._name, mode)
OSError: dlopen(/lib/libc.so.6, 6): image not found
Seems like the
libc.dylib
is removed on macOS BigSur.When you use
trash-empty
ortrash-restore
, the following OSError will be raised.