cp:不通过悬空符号链接“/usr/lib/x86_64-linux-gnu/libhdf5.so”写入

S.E*_*.EB 1 ubuntu ubuntu-14.04 caffe pycaffe ubuntu-16.04

我正面临这个问题,请你给我一些提示如何解决这个问题:

$sudo cp ~/anaconda2/lib/libhdf5* /usr/lib/x86_64-linux-gnu/
cp: not writing through dangling symlink '/usr/lib/x86_64-linux-gnu/libhdf5.so'
cp: not writing through dangling symlink '/usr/lib/x86_64-linux-gnu/libhdf5_hl.so'
Run Code Online (Sandbox Code Playgroud)

谢谢

Ale*_*der 6

我看到这个问题有点过时了,但无论如何:

一个悬空的符号链接的,实际上,破符号链接,其指向任何地方。
因此,在这种情况下,必须检查目标路径(也许它已移动到某处)或使用 cp 的参数--remove-destination

man cp页面:

--remove-destination
    remove  each existing destination file before attempting to open
    it (contrast with --force)
Run Code Online (Sandbox Code Playgroud)