libcurl错误在raspberry中执行dotnet 2.0控制台程序

问题描述 投票:0回答:1

我正在尝试在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类,这个类也不起作用:

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);
        }
    }
}
.net-core libcurl raspberry-pi2
1个回答
0
投票

问题是我为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。

© www.soinside.com 2019 - 2024. All rights reserved.