嵌入式:解压时出现“cannot change ownership”问题的解决方案

问题发现:

用tar -zxvf 解压文件的时候发现如下问题“cannot change ownership to uid 0”。

嵌入式:解压时出现“cannot change ownership”问题的解决方案

 问题出现原因:

解压文件本来要求解压到的分区,格式要求是ext的,但是解压时,确实其他的格式,比如fat32的,就会报这个错。可以使用df -T看看分区格式,如下:

[email protected]:~/newkernel/linux-4.20.13$ df -T
文件系统                    类型                 1K-块     已用      可用 已用% 挂载点
udev                        devtmpfs            221508        0    221508    0% /dev
tmpfs                       tmpfs                47056     5456     41600   12% /run
/dev/mapper/debian--vg-root ext4              19745212  8675820  10043344   47% /
tmpfs                       tmpfs               235264        0    235264    0% /dev/shm
tmpfs                       tmpfs                 5120        4      5116    1% /run/lock
tmpfs                       tmpfs               235264        0    235264    0% /sys/fs/cgroup
/dev/sda1                   ext2                240972    42407    186124   19% /boot
vmhgfs-fuse                 fuse.vmhgfs-fuse 208282620 16218804 192063816    8% /mnt/hgfs
tmpfs                       tmpfs                47052       28     47024    1% /run/user/115
tmpfs                       tmpfs                47052       24     47028    1% /run/user/1000
/dev/sr0                    iso9660            3538944  3538944         0  100% /media/cdrom0

解决方法:

就是将目标分区的格式弄成ext的就可以了。