Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

The library 'libhostpolicy.so' required to execute the application was not found

Tags:

During running a dotnet console application I encountered this error. I ran it from a directory that had the .dll and .pdb file copied into it.

What is the cause of this error?

like image 283
David Hunsicker Avatar asked May 30 '18 13:05

David Hunsicker


1 Answers

Please check chmod of application folder. When I change folder access mode, problem was resolved. I know it is a little weird but sometimes it can be related to that :)

You have to determine them like that;

sudo chown -R yourusername:yourusername /var/www/
sudo setfacl -R -d -m u:yourusername:rwx,g:yourusername:rwx,o::r /var/www/

If you don't have setfacl command please install ACL package via this command;

sudo apt install acl

If this doesn't work, please use this command when publishing your project(in Package Manager Console of Visual Studio);

dotnet publish -c Release --self-contained --runtime linux-x64 -o out

And it will create "out" folder in your solution directory, you can copy its contain to server.

like image 116
Mirac Avatar answered Oct 12 '22 08:10

Mirac