尝试在Visual Studio 2017中使用跨平台连接管理器连接到Raspberry Pi 3 Model B +时出现错误。
系统规格- Windows 10专业版64位 Microsoft Visual Studio社区2017 版本15.7.4
尝试连接到Raspberry Pi时遇到问题,下载和更新IntelliSense标头时出现错误。
我在Raspberry Pi中安装了Zip软件包。
我已在PC上启用了WSL。
阅读文章后,我已将Raspberry Pi中的SSH端口号更改为24,启用WSL可能会导致端口号冲突。
C:\Users\Admin\AppData\Local\Temp\vslinux_header_update_log.txt
的内容
liblinux.ExceptionBase: Failed to archive sysroot, command used: 'zip -r /var/tmp/sysroot_58cf76b6-9a42-4d28-b56f-eb7e4a8d7152.zip '.
at liblinux.Services.RemoteCompiler.CreateSysrootArchive()
at liblinux.Services.RemoteCompiler.DownloadSysroot()
at liblinux.Services.RemoteCompiler.CreateSysroot()
at liblinux.Services.RemoteCompiler.CreateLocalSysroot()
at Microsoft.VisualStudio.Linux.Package.Dialogs.HeaderUpdateDialog.<>c__DisplayClass17_0.<DownloadUpdate>b__0(Object _)
liblinux.ExceptionBase: Failed to archive sysroot, command used: 'zip -r /var/tmp/sysroot_bc0c8b61-9015-449c-9d73-c50556d78085.zip '.
at liblinux.Services.RemoteCompiler.CreateSysrootArchive()
at liblinux.Services.RemoteCompiler.DownloadSysroot()
at liblinux.Services.RemoteCompiler.CreateSysroot()
at liblinux.Services.RemoteCompiler.CreateLocalSysroot()
at Microsoft.VisualStudio.Linux.Package.Dialogs.HeaderUpdateDialog.<>c__DisplayClass17_0.<DownloadUpdate>b__0(Object _)
liblinux.ExceptionBase: Failed to archive sysroot, command used: 'zip -r /var/tmp/sysroot_5edacd19-9824-4878-b754-9593eda2c34c.zip '.
at liblinux.Services.RemoteCompiler.CreateSysrootArchive()
at liblinux.Services.RemoteCompiler.DownloadSysroot()
at liblinux.Services.RemoteCompiler.CreateSysroot()
at liblinux.Services.RemoteCompiler.CreateLocalSysroot()
at Microsoft.VisualStudio.Linux.Package.Dialogs.HeaderUpdateDialog.<>c__DisplayClass17_0.<DownloadUpdate>b__0(Object _)
liblinux.ExceptionBase: Failed to archive sysroot, command used: 'zip -r /var/tmp/sysroot_c82fda29-58b6-401a-a922-2f2ba3e5aaee.zip '.
at liblinux.Services.RemoteCompiler.CreateSysrootArchive()
at liblinux.Services.RemoteCompiler.DownloadSysroot()
at liblinux.Services.RemoteCompiler.CreateSysroot()
at liblinux.Services.RemoteCompiler.CreateLocalSysroot()
at Microsoft.VisualStudio.Linux.Package.Dialogs.HeaderUpdateDialog.<>c__DisplayClass17_0.<DownloadUpdate>b__0(Object _)
liblinux.ExceptionBase: Failed to archive sysroot, command used: 'zip -r /var/tmp/sysroot_d5a9b84e-02ca-4953-bb3a-2e9e2807fc35.zip '.
at liblinux.Services.RemoteCompiler.CreateSysrootArchive()
at liblinux.Services.RemoteCompiler.DownloadSysroot()
at liblinux.Services.RemoteCompiler.CreateSysroot()
at liblinux.Services.RemoteCompiler.CreateLocalSysroot()
at Microsoft.VisualStudio.Linux.Package.Dialogs.HeaderUpdateDialog.<>c__DisplayClass17_0.<DownloadUpdate>b__0(Object _)
liblinux.ExceptionBase: Failed to archive sysroot, command used: 'zip -r /var/tmp/sysroot_6beaebe0-61c8-4823-ad51-7334d595214c.zip /usr/lib/gcc/arm-linux-gnueabihf/4.9/include /usr/local/include /usr/lib/gcc/arm-linux-gnueabihf/4.9/include-fixed /usr/include/arm-linux-gnueabihf /usr/include /usr/include/c++/4.9 /usr/include/arm-linux-gnueabihf/c++/4.9/. /usr/include/c++/4.9/backward'.
at liblinux.Services.RemoteCompiler.CreateSysrootArchive()
at liblinux.Services.RemoteCompiler.DownloadSysroot()
at liblinux.Services.RemoteCompiler.CreateSysroot()
at liblinux.Services.RemoteCompiler.CreateLocalSysroot()
at Microsoft.VisualStudio.Linux.Package.Dialogs.HeaderUpdateDialog.<>c__DisplayClass17_0.<DownloadUpdate>b__0(Object _)
liblinux.ExceptionBase: Failed to archive sysroot, command used: 'zip -r /var/tmp/sysroot_35e760b1-b975-4667-b92a-7d9d37a91a99.zip /usr/lib/gcc/arm-linux-gnueabihf/4.9/include /usr/local/include /usr/lib/gcc/arm-linux-gnueabihf/4.9/include-fixed /usr/include/arm-linux-gnueabihf /usr/include /usr/include/c++/4.9 /usr/include/arm-linux-gnueabihf/c++/4.9/. /usr/include/c++/4.9/backward'.
at liblinux.Services.RemoteCompiler.CreateSysrootArchive()
at liblinux.Services.RemoteCompiler.DownloadSysroot()
at liblinux.Services.RemoteCompiler.CreateSysroot()
at liblinux.Services.RemoteCompiler.CreateLocalSysroot()
at Microsoft.VisualStudio.Linux.Package.Dialogs.HeaderUpdateDialog.<>c__DisplayClass17_0.<DownloadUpdate>b__0(Object _)
liblinux.ExceptionBase: Failed to archive sysroot, command used: 'zip -r /var/tmp/sysroot_de18236a-d534-4d44-9354-f2b37e2103e2.zip '.
at liblinux.Services.RemoteCompiler.CreateSysrootArchive()
at liblinux.Services.RemoteCompiler.DownloadSysroot()
at liblinux.Services.RemoteCompiler.CreateSysroot()
at liblinux.Services.RemoteCompiler.CreateLocalSysroot()
at Microsoft.VisualStudio.Linux.Package.Dialogs.HeaderUpdateDialog.<>c__DisplayClass17_0.<DownloadUpdate>b__0(Object _)
liblinux.ExceptionBase: Failed to archive sysroot, command used: 'zip -r /var/tmp/sysroot_2ecb6a6a-ad6d-4a7b-99fd-dab0178e6e9f.zip '.
at liblinux.Services.RemoteCompiler.CreateSysrootArchive()
at liblinux.Services.RemoteCompiler.DownloadSysroot()
at liblinux.Services.RemoteCompiler.CreateSysroot()
at liblinux.Services.RemoteCompiler.CreateLocalSysroot()
at Microsoft.VisualStudio.Linux.Package.Dialogs.HeaderUpdateDialog.<>c__DisplayClass17_0.<DownloadUpdate>b__0(Object _)
当我尝试在Raspberry Pi 3上的g ++-8.1.0中构建程序时,程序构建失败。 我已经成功构建了g ++-8.1.0并在其上编译了一个c ++ 17程序(本机构建)。
g++ exited with code 1, please see the Output Window - Build output for more details (NOTE: the build output verbosity might need to be changed in Tools Options to see more information in the Output Window). ConsoleApplication6 C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCTargets\Application Type\Linux\1.0\Linux.targets 310
答案 0 :(得分:0)
这可能应该是评论,但我不能发表低于50的评论...
您的日志文件中的错误与此处列出的错误相同: https://github.com/Microsoft/VSLinux/issues/274
这些是与未在Raspberry Pi上安装(或找到)zip有关的错误。我意识到您提到您在Pi上安装了一个Zip软件包。可能是gzip吗?
该链接指定当前仅支持zip(特别是不支持gzip)。我会尝试从apt-get存储库安装(或重新安装)zip,以希望确保已将其安装在Visual Studio所需要的位置。祝你好运。