Swap out Matlab/Runtime folder tree, tar won't ceate symlink

3 次查看(过去 30 天)
I am on an Ubuntu VM (VirtualBox). I created the VM with limited disk space. I find myself switching between different versions of Matlab and their associated Runtimes. Because of the small virtual disk, I am uninstalling a version of Matlab or a version of its Runtime in order to install something else. The installation takes place over the internet, and unfortunately, I have modest bandwidth meant for home use.
Instead of uninstalling and re-installing, I tried to save time by temporarily swapping out a Runtime or a Matlab version and storing it in the much larger disk of the host Windows OS. If we assume that the host OS user's home folder is mounted as /media/sf_HostOSusr and the Runtime folder tree is rooted at /usr/local/MATLAB/MATLAB_Runtime/v912:
cd /usr/local/MATLAB/MATLAB_Runtime/
tar czf \
/media/sf_HostOSusr/VendorApp/matlab/20230425.1502%usr%local%MATLAB%MATLAB_Runtime%V912.tgz \
v912
I get several dozen errors:
tar: v912/bin/glnxa64/libmwfftw3f_mpi.so.3: Cannot create symlink to ‘libmwfftw3f_mpi.so.3.5.8’: Operation not permitted
tar: v912/bin/glnxa64/libPDFRes.so.7: Cannot create symlink to ‘libPDFRes.so.7.1’: Operation not permitted
tar: v912/bin/glnxa64/libmwfftw3f.so.3: Cannot create symlink to ‘libmwfftw3f.so.3.5.8’: Operation not permitted
<...snip...>
tar: v912/runtime/glnxa64/libmwmclmcrrt.so: Cannot create symlink to ‘libmwmclmcrrt.so.9.12’: Operation not permitted
tar: v912/sys/java/jre/glnxa64/jre/lib/amd64/server/libjsig.so: Cannot create symlink to ‘../libjsig.so’: Operation not permitted
tar: v912/bin/glnxa64/libMatlabDataArray.so: Cannot create symlink to ‘../../extern/bin/glnxa64/libMatlabDataArray.so’: Operation not permitted
tar: Exiting with failure status due to previous errors
Most of these symbolic links are to files existing in the same directory. I didn't think that it is due to incompatibilities with the host Windows 10 (64-bit) file system, since the tar'd up content is encapsulated within a tar ball. **What are some other reasons for such symlink problems in creating a tar ball?**
I tried archiving one symlink and its target from above, which didn't result in any symlink errors:
cd v912/runtime/glnxa64/
tar czf /media/sf_HostOSusr/tmp/Test.zip libmwmclmcrrt.so libmwmclmcrrt.so.9.12cd v912/runtime/glnxa64/
  9 个评论
FM
FM 2023-4-26
编辑:FM 2023-4-26
Huh! Looks like my attempted response didn't make it. Apologies if it shows up later, as a duplicate post.
I've used scp in the past and just browsed the rsync page now. They are/seem great for file transfer, but I think the key benefit of tar is that it encapsulates the file tree as a black box so that the host OS doesn't mangle it by trying to create a local file system counterpart. So does zip, but I trust tar more bundling up a Linux file system. Too many stealth issues with zip in the past with incompatible file paths, overly long file paths, and oversized zip files. They may be ironed out now, and maybe the Linux port doesn't have some of these issues, but I don't want to tempt fate. Trust is important because the Ubuntu VM doesn't have room for me to unpack the archive snapshot created on the host OS's file system, so I can't compare it with the original. Unpacking it into the host OS file system, which has way more room, will almost surely result in infidelity of the content.

请先登录,再进行评论。

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Introduction to Installation and Licensing 的更多信息

标签

产品


版本

R2023a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by