libcurl 在树莓派中执行 dotnet 2.0 控制台程序时出错
libcurl error executing dotnet 2.0 console program in raspberry
我正在尝试在 Raspberry 2 (raspbian) 中执行一个简单的程序。其他小型控制台项目工作正常,但这个显示此错误:
dotnet: relocation error: /opt/dotnet/shared/Microsoft.NETCore.App/2.0.4/System.Net.Http.Native.so: symbol curl_multi_wait, version CURL_OPENSSL_3 not defined in file libcurl.so.4 with link time reference
我尝试安装 libcurl4-openssl-dev 但这并没有解决问题。有什么想法吗?
编辑:
该程序正在使用 System.Net 库中的 WebClient class,这个也不起作用:
using System;
using System.Net;
namespace pruebahttpnet
{
class Program
{
static void Main(string[] args)
{
var cander = new WebClient().DownloadString(new Uri("https://gist.githubusercontent.com/febuiles/caec38b2bdf5768f4abf0677249d6901/raw/4426349bdb23018088e19db0dc22dcd4f3e1fee1/foo.txt"));
Console.WriteLine(cander);
}
}
}
问题是我为 Jessie 发行版安装了 dotnet,Raspbian 是 Wheezy 版本:
deb [arch=amd64] https://packages.microsoft.com/repos/microsoft-debian-jessie-prod jessie main
我解决了将 Raspbian 升级到 jessie 版本以获得具有 curl_multi_wait 函数定义的 libcurl >7.28。
我正在尝试在 Raspberry 2 (raspbian) 中执行一个简单的程序。其他小型控制台项目工作正常,但这个显示此错误:
dotnet: relocation error: /opt/dotnet/shared/Microsoft.NETCore.App/2.0.4/System.Net.Http.Native.so: symbol curl_multi_wait, version CURL_OPENSSL_3 not defined in file libcurl.so.4 with link time reference
我尝试安装 libcurl4-openssl-dev 但这并没有解决问题。有什么想法吗?
编辑: 该程序正在使用 System.Net 库中的 WebClient class,这个也不起作用:
using System;
using System.Net;
namespace pruebahttpnet
{
class Program
{
static void Main(string[] args)
{
var cander = new WebClient().DownloadString(new Uri("https://gist.githubusercontent.com/febuiles/caec38b2bdf5768f4abf0677249d6901/raw/4426349bdb23018088e19db0dc22dcd4f3e1fee1/foo.txt"));
Console.WriteLine(cander);
}
}
}
问题是我为 Jessie 发行版安装了 dotnet,Raspbian 是 Wheezy 版本:
deb [arch=amd64] https://packages.microsoft.com/repos/microsoft-debian-jessie-prod jessie main
我解决了将 Raspbian 升级到 jessie 版本以获得具有 curl_multi_wait 函数定义的 libcurl >7.28。