Cannot create symlink/symbolic to `xxx': Operation not supported

博客讲述在虚拟机共享目录解压内核源码报错,原因是Windows文件系统不支持Linux符号链接。将文件移至其他目录可成功解压,若要在Windows查看,移动解压后目录又遇问题,拷贝文件也不行,最终将文件压缩为zip格式拷贝解决问题。

1、Cannot create symlink to `xxx': Operation not supported

在虚拟机的共享目录中,解压内核源码,试过了几种解压方法都报出如下错误:

tar: linux-4.15/tools/testing/selftests/powerpc/vphn/vphn.h: Cannot create symlink to `../../../../../arch/powerpc/mm/vphn.h': Operation not supported
tar: linux-4.15/tools/testing/selftests/powerpc/vphn/vphn.c: Cannot create symlink to `../../../../../arch/powerpc/mm/vphn.c': Operation not supported
tar: linux-4.15/tools/testing/selftests/powerpc/stringloops/memcmp_64.S: Cannot create symlink to `../../../../../arch/powerpc/lib/memcmp_64.S': Operation not supported
tar: linux-4.15/tools/testing/selftests/powerpc/primitives/word-at-a-time.h: Cannot create symlink to `../../../../../arch/powerpc/include/asm/word-at-a-time.h': Operation not supported
tar: linux-4.15/tools/testing/selftests/powerpc/primitives/asm/ppc_asm.h: Cannot create symlink to `../../../../../../arch/powerpc/include/asm/ppc_asm.h': Operation not supported
tar: linux-4.15/tools/testing/selftests/powerpc/primitives/asm/asm-compat.h: Cannot create symlink to `../.././../../../../arch/powerpc/include/asm/asm-compat.h': Operation not supported
tar: linux-4.15/tools/testing/selftests/powerpc/copyloops/memcpy_power7.S: Cannot create symlink to `../../../../../arch/powerpc/lib/memcpy_power7.S': Operation not supported
tar: linux-4.15/tools/testing/selftests/powerpc/copyloops/memcpy_64.S: Cannot create symlink to `../../../../../arch/powerpc/lib/memcpy_64.S': Operation not supported
tar: linux-4.15/tools/testing/selftests/powerpc/copyloops/copyuser_power7.S: Cannot create symlink to `../../../../../arch/powerpc/lib/copyuser_power7.S': Operation not supported
tar: linux-4.15/tools/testing/selftests/powerpc/copyloops/copyuser_64.S: Cannot create symlink to `../../../../../arch/powerpc/lib/copyuser_64.S': Operation not supported
tar: linux-4.15/scripts/dtc/include-prefixes/xtensa: Cannot create symlink to `../../../arch/xtensa/boot/dts': Operation not supported
tar: linux-4.15/scripts/dtc/include-prefixes/sh: Cannot create symlink to `../../../arch/sh/boot/dts': Operation not supported
tar: linux-4.15/scripts/dtc/include-prefixes/powerpc: Cannot create symlink to `../../../arch/powerpc/boot/dts': Operation not supported
tar: linux-4.15/scripts/dtc/include-prefixes/openrisc: Cannot create symlink to `../../../arch/openrisc/boot/dts': Operation not supported
tar: linux-4.15/scripts/dtc/include-prefixes/nios2: Cannot create symlink to `../../../arch/nios2/boot/dts': Operation not supported
tar: linux-4.15/scripts/dtc/include-prefixes/mips: Cannot create symlink to `../../../arch/mips/boot/dts': Operation not supported
tar: linux-4.15/scripts/dtc/include-prefixes/microblaze: Cannot create symlink to `../../../arch/microblaze/boot/dts': Operation not supported
tar: linux-4.15/scripts/dtc/include-prefixes/metag: Cannot create symlink to `../../../arch/metag/boot/dts': Operation not supported
tar: linux-4.15/scripts/dtc/include-prefixes/h8300: Cannot create symlink to `../../../arch/h8300/boot/dts': Operation not supported
tar: linux-4.15/scripts/dtc/include-prefixes/dt-bindings: Cannot create symlink to `../../../include/dt-bindings': Operation not supported
tar: linux-4.15/scripts/dtc/include-prefixes/cris: Cannot create symlink to `../../../arch/cris/boot/dts': Operation not supported
tar: linux-4.15/scripts/dtc/include-prefixes/c6x: Cannot create symlink to `../../../arch/c6x/boot/dts': Operation not supported
tar: linux-4.15/scripts/dtc/include-prefixes/arm64: Cannot create symlink to `../../../arch/arm64/boot/dts': Operation not supported
tar: linux-4.15/scripts/dtc/include-prefixes/arm: Cannot create symlink to `../../../arch/arm/boot/dts': Operation not supported
tar: linux-4.15/scripts/dtc/include-prefixes/arc: Cannot create symlink to `../../../arch/arc/boot/dts': Operation not supported
tar: linux-4.15/include/dt-bindings/input/linux-event-codes.h: Cannot create symlink to `../../uapi/linux/input-event-codes.h': Operation not supported
tar: linux-4.15/arch/arm64/boot/dts/arm/vexpress-v2m-rs1.dtsi: Cannot create symlink to `../../../../arm/boot/dts/vexpress-v2m-rs1.dtsi': Operation not supported
tar: Exiting with failure status due to previous errors

根据这些报错信息,总结出报错原因为:

Cannot create symlink to `xxx': Operation not supported

我是在root状态下执行的解压命令,权限应该是没有问题的。

猜测是否是由于共享目录引起的愿意,当前待解压文件位于共享文件目录:

/mnt/hgfs/share2

试着将文件移入到其他目录:

我将待解压文件移入到home目录下,然后再使用解压命令进行解压,最后解压成功了,结果如下:

结果证明了猜测,是共享目录造成了解压失败,可能是因为windows与linux共享目录,在两种环境下造成的原因。但是造成原因的具体情况还是不太清楚,所以进一步通过搜索该问题了解该问题产生原因。

找到如下解释:

1、https://blog.csdn.net/leeafu/article/details/7449578

Windows共享目录, fat分区等是不支持linux的符号链接,必须在ext3/4, btrfs等这些分区格式的目录下解压。

2、https://blog.csdn.net/yanhe156/article/details/79768290

linux处理的时候把fat/vfat/fat32的文件系统 统一用vfat来表示,windows下的FAT,FAT32,NTFS文件系统是不支持linux的symbok link的。

……

从这些博客中,了解到了问题产生的具体原因,即windows下的文件系统,不支持linux的symbok link的。所以造成了解压失败,将文件移出共享文件再解压即可

但是我解压文件是想在Windows下进行查看,所以我使用mv命令移动解压后的目录进入到共享目录中,这时又遇到了如下问题:

cannot create symbolic link `xxx': Operation not supported

2、cannot create symbolic link `xxx': Operation not supported

又是一堆报错信息:

mv: cannot create symbolic link `/mnt/hgfs/share2/linux-4.15/Documentation/Changes': Operation not supported
mv: cannot create symbolic link `/mnt/hgfs/share2/linux-4.15/include/dt-bindings/input/linux-event-codes.h': Operation not supported
mv: cannot create symbolic link `/mnt/hgfs/share2/linux-4.15/scripts/dtc/include-prefixes/metag': Operation not supported
mv: cannot create symbolic link `/mnt/hgfs/share2/linux-4.15/scripts/dtc/include-prefixes/arm64': Operation not supported
mv: cannot create symbolic link `/mnt/hgfs/share2/linux-4.15/scripts/dtc/include-prefixes/h8300': Operation not supported
mv: cannot create symbolic link `/mnt/hgfs/share2/linux-4.15/scripts/dtc/include-prefixes/c6x': Operation not supported
mv: cannot create symbolic link `/mnt/hgfs/share2/linux-4.15/scripts/dtc/include-prefixes/arm': Operation not supported
mv: cannot create symbolic link `/mnt/hgfs/share2/linux-4.15/scripts/dtc/include-prefixes/microblaze': Operation not supported
mv: cannot create symbolic link `/mnt/hgfs/share2/linux-4.15/scripts/dtc/include-prefixes/dt-bindings': Operation not supported
mv: cannot create symbolic link `/mnt/hgfs/share2/linux-4.15/scripts/dtc/include-prefixes/powerpc': Operation not supported
mv: cannot create symbolic link `/mnt/hgfs/share2/linux-4.15/scripts/dtc/include-prefixes/arc': Operation not supported
mv: cannot create symbolic link `/mnt/hgfs/share2/linux-4.15/scripts/dtc/include-prefixes/xtensa': Operation not supported
mv: cannot create symbolic link `/mnt/hgfs/share2/linux-4.15/scripts/dtc/include-prefixes/mips': Operation not supported
mv: cannot create symbolic link `/mnt/hgfs/share2/linux-4.15/scripts/dtc/include-prefixes/cris': Operation not supported
mv: cannot create symbolic link `/mnt/hgfs/share2/linux-4.15/scripts/dtc/include-prefixes/sh': Operation not supported
mv: cannot create symbolic link `/mnt/hgfs/share2/linux-4.15/scripts/dtc/include-prefixes/openrisc': Operation not supported
mv: cannot create symbolic link `/mnt/hgfs/share2/linux-4.15/scripts/dtc/include-prefixes/nios2': Operation not supported
mv: cannot create symbolic link `/mnt/hgfs/share2/linux-4.15/tools/testing/selftests/powerpc/vphn/vphn.c': Operation not supported
mv: cannot create symbolic link `/mnt/hgfs/share2/linux-4.15/tools/testing/selftests/powerpc/vphn/vphn.h': Operation not supported
mv: cannot create symbolic link `/mnt/hgfs/share2/linux-4.15/tools/testing/selftests/powerpc/copyloops/copyuser_64.S': Operation not supported
mv: cannot create symbolic link `/mnt/hgfs/share2/linux-4.15/tools/testing/selftests/powerpc/copyloops/memcpy_64.S': Operation not supported
mv: cannot create symbolic link `/mnt/hgfs/share2/linux-4.15/tools/testing/selftests/powerpc/copyloops/copyuser_power7.S': Operation not supported
mv: cannot create symbolic link `/mnt/hgfs/share2/linux-4.15/tools/testing/selftests/powerpc/copyloops/memcpy_power7.S': Operation not supported
mv: cannot create symbolic link `/mnt/hgfs/share2/linux-4.15/tools/testing/selftests/powerpc/primitives/asm/ppc_asm.h': Operation not supported
mv: cannot create symbolic link `/mnt/hgfs/share2/linux-4.15/tools/testing/selftests/powerpc/primitives/asm/asm-compat.h': Operation not supported
mv: cannot create symbolic link `/mnt/hgfs/share2/linux-4.15/tools/testing/selftests/powerpc/primitives/word-at-a-time.h': Operation not supported
mv: cannot create symbolic link `/mnt/hgfs/share2/linux-4.15/tools/testing/selftests/powerpc/stringloops/memcmp_64.S': Operation not supported
mv: cannot create symbolic link `/mnt/hgfs/share2/linux-4.15/arch/arm64/boot/dts/arm/vexpress-v2m-rs1.dtsi': Operation not supported
mv: cannot create symbolic link `/mnt/hgfs/share2/linux-4.15/arch/arm/boot/dts/sun8i-a33-et-q8-v1.6.dts': Operation not supported
mv: cannot create symbolic link `/mnt/hgfs/share2/linux-4.15/arch/arm/boot/dts/sun8i-a23-ippo-q8h-v1.2.dts': Operation not supported
mv: cannot create symbolic link `/mnt/hgfs/share2/linux-4.15/arch/arm/boot/dts/sun8i-a23-ippo-q8h-v5.dts': Operation not supported
mv: cannot create symbolic link `/mnt/hgfs/share2/linux-4.15/arch/arm/boot/dts/sun8i-a33-ippo-q8h-v1.2.dts': Operation not supported

总结起来就是:cannot create symbolic link `xxx': Operation not supported

通过报错信息,感觉还是和上面同样的问题,还是Windows文件系统不支持符号链接(symbolic link)。

试了 mv 不行,准备再用 cp 试试:

通过:

cp --help

 得到cp指令使用方式:

结合博客《cp命令详解》,使用了如下cp 命令进行copy

方式1:

cp -a linux-4.15 /mnt/hgfs/share2/linux-4.15

方式2:

cp -r linux-4.15 /mnt/hgfs/share2/linux-4.15

方式3:

cp -r -d linux-4.15 /mnt/hgfs/share2/linux-4.15

都存在这种问题,于是另外想解决方案,既然拷贝文件不行,将这个文件压缩为zip格式来进行拷贝,这样在共享文件中也好解压。

使用命令:

zip -r linux-4.15.zip linux-4.15

压缩为 zip 后,再使用 cp 命令进行拷贝,拷贝成功后,使用Windows工具解压,或者使用unzip解压都可以,这时候不会报出Operation not supported 的问题。

 

3、总结

Cannot create symlink to `xxx': Operation not supported
Cannot create symbolic to `xxx': Operation not supported

两个问题都是windows下的文件系统,不支持linux的symbok link 造成的,知道这个原因后有很多解决方案,但是感觉我这个方式有点绕,主要就是避开Windows与Linux的差异。

源码下载地址: https://pan.quark.cn/s/a4b39357ea24 【运算单元构造实验报告】运算单元是计算机硬件系统中的关键构成部分,主要承担执行算术运算和逻辑运算的任务。在本次实验中,我们着重探讨了带有累加器的运算单元的设计,涵盖了溢出识别、有符号数值与无符号数值运算的差异性,以及采用补码方式进行的加法与减法运算的实现机制。 一、实验目标 1. 掌握运算单元的基本构造,理解带有累加器的运算单元的具体实现途径。 2. 学习并领会溢出检测的机制,能够设计并构建溢出检测电路,用以判定运算结果是否超出了数据类型的表示范畴。 3. 明辨有符号数值和无符号数值运算的不同特性,把握它们在运算过程中各自的处理方法。 4. 熟练掌握基于补码方式的加法与减法运算的执行,理解补码形式下的溢出判定准则。 5. 熟悉运算单元内部的数据传输路线,明晰数据在运算过程中的流转路径。 6. 设计一个能够支持有符号数值与无符号数值运算、补码加法/减法运算以及有符号数值溢出检测的运算单元电路。 二、实验仪器 采用JZYL—Ⅱ型计算机组成原理实验装置,配备2片74181运算单元芯片作为算术逻辑单元(ALU),2片74LS373用作八位D型锁存器,并辅以一些基础门电路和多路选择器来完成电路设计。 三、实验内容 1. 运用片74181构建一个8位运算单元,负责处理数据的高4位与低4位。 2. 设计并实现溢出检测电路,确保在有符号数值与无符号数值的加法运算中均能准确识别溢出状况。 3. 通过74LS373增加累加器功能,使运算结果得以保存。 4. 将所有设计整合,利用多路选择器来支持有符号数值与无符号数值的加法/减法运算。 四、实验电路 1. 8位运算单元由2片74181构成,通过控制...
评论 4
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值