【发布时间】:2020-06-01 08:38:32
【问题描述】:
我正在我的桌面上交叉编译一个项目,并将其安装在通过 ssh 安装的设备上,使用 sshfs,如下所示:
sudo sshfs -o allow_other -o follow_symlinks user@192.168.12.100:/ /mnt/remote
构建成功,但是当我尝试“sudo make install”时,我收到以下消息:
-- Installing: /mnt/remote/usr/lib/libprop.so.5.1.5
-- Installing: /mnt/remote/usr/lib/libprop.so.5
CMake Error: failed to create symbolic link '/mnt/remote/usr/lib/libprop.so.5': i/o error
CMake Error at cmake_install.cmake:176 (file):file INSTALL cannot duplicate symlink
"/home/ubuntu/libprop/build/lib/libprop.so.5" at
"/mnt/remote/usr/lib/libprop.so.5".
库和符号链接被复制和创建。也就是说,看起来安装实际上成功了,但是CMake却不这么认为。
文件系统不是 ro,可以在mount 输出中看到:
user@192.168.12.100:/ on /mnt/remote type fuse.sshfs (rw,nosuid,nodev,relatime,user_id=0,group_id=0,allow_other)
我可以看到 /mnt/ 下的条目(我 chown'd 和 chmod'd 以供用户访问,认为它可能会解决问题):
drwxrwxr-x 1 ubuntu ubuntu 4096 Mar 11 13:43 remote
我可以在没有root权限的情况下访问它,复制和删除文件没有问题。
这个过程一直对我有用。我不知道它停止了什么变化。可能是我的环境中的某些东西,也可能是目标平台中的东西。
如果能提供任何帮助,我将不胜感激。
【问题讨论】:
标签: linux cmake cross-compiling symlink sshfs