Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Centos 7 Error convert #6

Open
detmach opened this issue Nov 5, 2022 · 3 comments
Open

Centos 7 Error convert #6

detmach opened this issue Nov 5, 2022 · 3 comments
Labels
bug Something isn't working

Comments

@detmach
Copy link

detmach commented Nov 5, 2022

Libwebp.Net.errors.CommandExecutionException: LibWebP.Net CommandExecutor Shell Failed: An error occurred trying to start process '/tmp/cwebp.sh' with working directory '/var/www/vhosts/xremaps.com/NetCore'. Permission denied

Hello, I encountered the above problem.
I will be glad if you help

Centos7 operating system

@detmach detmach changed the title Centos 7 Error conver Centos 7 Error convert Nov 5, 2022
@vitvitskyi
Copy link

Hello @detmach can I ask if you resolved the issue?
I have the same error on Heroku hosting:

LibWebP.Net CommandExecutor Shell Failed: An error occurred trying to start process '/tmp/cwebp.sh' with working directory '/app/heroku_output'. Permission denied

CC @frankodoom @thekojopatrick

@frankodoom
Copy link
Owner

Hi yet to test the library extensively on Linux distros ill fix any bugs and update the library

@frankodoom frankodoom added the bug Something isn't working label Feb 21, 2023
@stany24
Copy link

stany24 commented Sep 6, 2024

cwebp.sh.zip
Made it work by adding scwep.sh to build output and using this code:

using System.Diagnostics;

string[] path = Directory.GetFiles("/path/to/your/folder");

foreach (string image in path)
{
string Command = "./cwebp.sh cwebp "+image+" -o "+image;
ProcessStartInfo startInfo = new()
{
CreateNoWindow = true,
UseShellExecute = false,
FileName = "cwebp.sh",
WindowStyle = ProcessWindowStyle.Hidden,
Arguments = Command
};
try
{
Process cwebp = Process.Start(startInfo);
try
{
await cwebp.WaitForExitAsync();
if (!cwebp.HasExited)
cwebp.Kill();
}
finally
{
cwebp?.Dispose();
}
}
catch (Exception ex)
{
Console.WriteLine("LibWebP.Net CommandExecutor Shell Failed: " + ex.Message, ex.InnerException);
}
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants