惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

罗磊的独立博客
爱范儿
爱范儿
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
博客园_首页
博客园 - 叶小钗
酷 壳 – CoolShell
酷 壳 – CoolShell
Apple Machine Learning Research
Apple Machine Learning Research
云风的 BLOG
云风的 BLOG
量子位
博客园 - 三生石上(FineUI控件)
Stack Overflow Blog
Stack Overflow Blog
小众软件
小众软件
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
V
V2EX
人人都是产品经理
人人都是产品经理
V
Visual Studio Blog
Jina AI
Jina AI
L
LangChain Blog
M
MIT News - Artificial intelligence
MongoDB | Blog
MongoDB | Blog
Last Week in AI
Last Week in AI
Martin Fowler
Martin Fowler
WordPress大学
WordPress大学

博客园 - 麦壳饼

JekyllNet .Net 版本的Jekyll , 你博客 文档的静态生成利器 。 为什么要做 WinForms over LVGL 我把 WinFormsVncDemo 真正带到了 VNC 链路上 Ubuntu 22.04 systemd 升级失败解决全记录:dpkg “无效的跨设备链接” 错误(bind mount 导致) 暴力升级你的 ST-Link 及 STM32CubeIDE 如何像使用AspNetCore中的Controllers 和 Actions一样处理MQTT消息 龙芯.Net 6.0 SDK安装 用C#为国产智能手表写“Hello, China. ” CANopen伺服控制-服务数据对象(SDO)详细解析 IoTSharp部署教程-Sqlite分表篇 IoTSharp 已支持国产松果时序数据库PinusDB IoTSharp v1.6.0 发布 增加多种数据库支持 Cannot open libmwv206dec.so, libmwv206dec.so: cannot open shared object file: No such file or directory 引用了Maikebing.Data.Taos的.Net Core项目,在 docker 部署的时候提示缺少taos依赖 基于.Net Core开发的物联网平台 IoTSharp V1.5 发布 如何在龙芯3B4000上部署基于.Net Core 开发的物联网平台IoTSharp 使用C#编写STM32对接物联网平台IoTSharp发送遥测数据 用C#在STM32上写第一个Hello world SilkierQuartz 1.0.21 发布, 是一个 Quartz.NET 的强大且简单的Web管理工具和承载组件
.Net 7.0 AOT /usr/bin/ld: cannot find -lz
麦壳饼 · 2022-12-29 · via 博客园 - 麦壳饼

命令:

sudo dotnet publish -c Release

报错内容:
MSBuild version 17.4.0+18d5aef85 for .NET
Determining projects to restore...
All projects are up-to-date for restore.
oschina2022 -> /mnt/d/GitHub/oschina2022/oschina2022/bin/Release/net7.0/linux-x64/oschina2022.dll
/usr/bin/ld: cannot find -lz
collect2 : error : ld returned 1 exit status [/mnt/d/GitHub/oschina2022/oschina2022/oschina2022.csproj]
/usr/share/dotnet/sdk/7.0.101/Sdks/Microsoft.DotNet.ILCompiler/build/Microsoft.NETCore.Native.targets(346,5): error MSB3073: The command ""gcc" "obj/Release/net7.0/linux-x64/native/oschina2022.o" -o "bin/Release/net7.0/linux-x64/native/oschina2022" /home/maikebing/.nuget/packages/runtime.linux-x64.microsoft.dotnet.ilcompiler/7.0.1/sdk/libbootstrapper.a /home/maikebing/.nuget/packages/runtime.linux-x64.microsoft.dotnet.ilcompiler/7.0.1/sdk/libRuntime.WorkstationGC.a /home/maikebing/.nuget/packages/runtime.linux-x64.microsoft.dotnet.ilcompiler/7.0.1/framework/libSystem.Native.a /home/maikebing/.nuget/packages/runtime.linux-x64.microsoft.dotnet.ilcompiler/7.0.1/framework/libSystem.Globalization.Native.a /home/maikebing/.nuget/packages/runtime.linux-x64.microsoft.dotnet.ilcompiler/7.0.1/framework/libSystem.IO.Compression.Native.a /home/maikebing/.nuget/packages/runtime.linux-x64.microsoft.dotnet.ilcompiler/7.0.1/framework/libSystem.Net.Security.Native.a /home/maikebing/.nuget/packages/runtime.linux-x64.microsoft.dotnet.ilcompiler/7.0.1/framework/libSystem.Security.Cryptography.Native.OpenSsl.a -g -Wl,-rpath,'$ORIGIN' -Wl,--build-id=sha1 -Wl,--as-needed -pthread -lstdc++ -ldl -lm -lz -lrt -pie -Wl,-z,relro -Wl,-z,now -Wl,--discard-all -Wl,--gc-sections" exited with code 1. [/mnt/d/GitHub/oschina2022/oschina2022/oschina2022.csproj]

解决方法:

sudo apt-get install zlib1g-dev

yum install zlib-devel