I'm trying to execute a simple program in a Raspberry 2 (raspbian). Other little console projects work Ok, but this one shows this error:
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
I tried to install libcurl4-openssl-dev but that doesn't solve the problem. Any ideas?
Edit:
The program is using the WebClient class in the System.Net library, this one doesn't work either:
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);
}
}
}
The problem was that I installed dotnet for Jessie distribution and Raspbian was in Wheezy version:
deb [arch=amd64] https://packages.microsoft.com/repos/microsoft-debian-jessie-prod jessie main
I solved it upgrading Raspbian to jessie version to get libcurl >7.28 that has the curl_multi_wait function definition.
Related
I have the following problem when trying to launch a .jar file of my program in cmd: no main manifest attribute, in path/filename.jar
I tried to add the Main-Class to the MANIFEST.MF file, but then it says Error: Could not find or load main class.
In NetBeans I have set the Main Class at Properties->Run->Main Class to the one, which holds the function main(String[] args) in my case "com.nxp.vda_with_gui_1.version.App". I have also added VM Options for the JavaFX modules like the following:
--module-path C:\NetbeansJavaFX --add-modules javafx.controls,javafx.base,javafx.fxml,javafx.graphics,javafx.media
In NetBeans I can build and launch up my program without any errors, but when I try to "Run File" (Shift + F6) a different error will be put out:
Error: JavaFX runtime components are missing, and are required to run this application Command execution failed.
Any tips how to solve it?
Below you can find a picture of my file/package structure and some other information, maybe it helps finding a solution quicker:
file/package structure
JDK version: 16
JavaFX version: 18.0.2
OS: Windows
I want to use RaspberryIO library with dotnet core version 3.1 on Ubuntu 20.10.
When it comes to use
Pi.Init<BootstrapWiringPi>();
I got error:
Unhandled exception. System.DllNotFoundException: Unable to load shared library 'libwiringPi.so.2.52' or one of its dependencies. In order to help diagnose loading problems, consider setting the LD_DEBUG environment variable: liblibwiringPi.so.2.52: cannot open shared object file: No such file or directory
The same code works perfectly on Raspbian.
I use:
Raspberry Pi 4
In my case (Rpi3 + Ubuntu 20.04 x64 + dotnet core 3.1):
clone https://github.com/WiringPi/WiringPi
build
copy libwiringPi.so.2.60 and gpio to app folder
rename libwiringPi.so.2.60 to libwiringPi.so.2.52
and Pi.Init < BootstrapWiringPi >( );
with TestLedBlinking() is work.
In line
using Sqlite;
an error occurs: "The namespace name` Sqlite 'could not be found "
I previously installed SQLite and command line compilation works :
valac --pkg gtk + -3.0 --pkg sqlite3 -X -lm SomeFile.vala
But if I create and compile a project in Anjuta, then an error occurs
I use VS Code with VLS and Builder, but I think the same is true for Anjuta(is this IDE still alive?) For correct operation Vala Language Server all dependencies should be described in the Build file Meson. For the Vala Language Server to work correctly, all the dependencies must be described in the Meson Build file.
Here is an example that I use with the plugin for VS Code:
project('vala app', 'vala', 'c')
dependencies = [
dependency('glib-2.0'),
dependency('gobject-2.0'),
dependency('sqlite3'),
dependency('gee-0.8'),
]
sources = files('valite.vala')
executable('valite', sources, dependencies: dependencies, install: true)
After the installation of PHPunit 8.0.1 I got this error:
Fatal error: Declaration of Symfony\Bundle\FrameworkBundle\Test\KernelTestCase::tearDown() must be compatible with PHPUnit\Framework\TestCase::tearDown()
I am using PHP 7.2
Your tearDown function is not compatible with the function you extend.
You have to add the return type in order to implement the same declaration.
protected function tearDown(): void
See also documentation https://phpunit.de/announcements/phpunit-8.html section "Return Type of Template Methods"
Using SkiaSharp 1.68.0 with .NET Core 2.2 on Linux and get this error when trying to use Decode on a jpeg-memory-stream (same code works on Windows):
System.TypeInitializationException: The type initializer for 'SkiaSharp.SKAbstractManagedStream' threw an exception. ---> System.DllNotFoundException: Unable to load shared library 'libSkiaSharp' or one of its dependencies. In order to help diagnose loading problems, consider setting the LD_DEBUG environment variable: liblibSkiaSharp: cannot open shared object file: No such file or directory
at SkiaSharp.SkiaApi.sk_managedstream_set_delegates(IntPtr pRead, IntPtr pPeek, IntPtr pIsAtEnd, IntPtr pHasPosition, IntPtr pHasLength, IntPtr pRewind, IntPtr pGetPosition, IntPtr pSeek, IntPtr pMove, IntPtr pGetLength, IntPtr pCreateNew, IntPtr pDestroy)
at SkiaSharp.SKAbstractManagedStream..cctor()
--- End of inner exception stack trace ---
at SkiaSharp.SKAbstractManagedStream..ctor(Boolean owns)
at SkiaSharp.SKManagedStream..ctor(Stream managedStream, Boolean disposeManagedStream, Boolean owns)
at SkiaSharp.SKManagedStream..ctor(Stream managedStream, Boolean disposeManagedStream)
at SkiaSharp.SKCodec.WrapManagedStream(Stream stream)
at SkiaSharp.SKCodec.Create(Stream stream, SKCodecResult& result)
at SkiaSharp.SKCodec.Create(Stream stream)
at SkiaSharp.SKBitmap.Decode(Stream stream)
The inner-most error message seem to be "No such file or directory" which is strange since I'm decoding a memory-stream. This works on Windows and it have worked on Linux before I upgraded to .NET Core 2.2 and latest SkiaSharp.
I have tried setting the LD_DEBUG env variable as suggested in the error message but that didn't do much. Not sure what to set it to really. Tried 'all' but that didn't result in any more detailed log.
Found a thread that suggests installing SkiaSharp.NativeAssets.Linux as a solution, but unfortunately that didn't help. Do I need to target Linux-x64 runtime when building/publishing? Have tried different combinations but couldn't detect any difference. (I'm building with dotnet cli in a Docker-file on Linux over ssh with putty. Pretty much default Docker-file as generated by VS:latest)
Another suggestion was to install libSkiaSharp.so manually and also apt-get install libfontconfig1, but unfortunately apt-get is not available on Synology DSM.
Installing Linux dependency NuGet Package will solve this issue
SkiaSharp.NativeAssets.Linux.NoDependencies
https://www.nuget.org/packages/SkiaSharp.NativeAssets.Linux.NoDependencies
I had the same problem running SkiaSharp with .Net Core 2.2 on Linux.
First, I installed the NuGet package SkiaSharp.NativeAssets.Linux (that you mention above) and made sure that the libSkiaSharp.so file was copied into the same directory as the rest of the DLLs.
I still received the error.
Next, I connected a shell to my container and I listed the dependencies using the command:
ldd libSkiaSharp.so
I found out that I was missing libfreetype6 and libfontconfig1.
As my environment uses Docker, I simply added some commands to install these extra dependencies in my docker file:
FROM microsoft/dotnet:aspnetcore-runtime
RUN apt-get update
RUN apt-get install -y libfreetype6
RUN apt-get install -y libfontconfig1
Now the application works.
Can you try adding these commands to your Docker file?