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
sh: line 1: exec: : not found (nodejs path empty) #199
Comments
Using sh 5.1. I do not know where the problem is, there's nothing. No exec in the classifier. |
I have glibc on my system... But how could I check?
I am a newbie to selinux. Could selinux cause the problem? |
I downloaded node.js and it seems to work now (of course I had to change the selinux permissions). However I do not consider this as an optimal solution since I have glibc installed on my system. |
This is curious. Not sure what causes this |
I just upgraded to v2 and I have the same problem. I'm running on a VM without AVX though so I ticked the ' `Classifying photos of user 20C77DC1-BDE5-454D-8D20-ED6FD88198F8 using imagenet Classifier process output: sh: 1: exec: : Permission denied Failed to classify images |
Aha I just downloaded node.js Linux binaries from https://nodejs.org/en/download/ and unzipped into /usr/local/lib/nodejs/ then set the Recognise config page to point to /usr/local/lib/nodejs/node-v16.15.0-linux-x64/bin/node Now occ recognize:classify-images runs just fine. Cheers, |
Huh, now I get where the error is coming from, hadn't seen that. That's weird. |
@debian-user-france1 You should be able to fix this by setting |
Do you mean On my side it was after a first installtion. Could I have removed the nodejs path by accident? Like.. I clicked on the field and it got removed? |
And this happened
It works with my own though. It's in /var/www/html/nextcloud/nodejs/node-v18.0.0-linux-x64/bin/node |
It should be |
Huh. Are you sure it's not just taking a long time to load? |
I get the same disabled settings in the GUI - however occ reports settings are still enabled. If I try to (re-)enable settings the status display on top of the page get's updated (and never finishes):
|
Replying to myself:
BTW: sh exec error also occurred on Ubuntu 20.04 / Nextcloud 24.0.0 / Recognize 2.0.1 |
When I use the correct path for nodejs (the shipped nodejs, /var/www/html/nextcloud/apps/recognize/bin/node) following will happen: Running array ( Classifier process output: sh: Zeile 1: /var/www/html/nextcloud/apps/recognize/bin/node: File or directory not found |
Does the file exist? |
What file do you mean? Yes, node exists. I am sure.
|
I get this error if there's a mismatch between the installed libc and the libc which is linked to by node -- for instance, if I installed Recognize while I was running the alpine/musl Docker image of Nextcloud, switching to a glibc Docker image causes the error since the downloaded node is still trying to find musl. Conversely, if I installed while running on a standard glibc image, switching to alpine/musl causes this "file not found" error. Probably the script which downloads node should keep track of which libc it's built against, and re-download node if libc changes. |
In my use-case, I have two services defined in my |
Oof, I'm not sure I want to explicitly support switching systems. Running occ app:disable and app:enable o recognize should fix the node version, though, I believe, can you confirm that? |
@arch-user-france1 So, there's a node executable at /var/www/html/nextcloud/apps/recognize/bin/node and you get File or directory not found. Can you try running
on the command line? |
It seems the node excutable that resides in your recognize directory expects a musl system. If you don't have musl on your system, that's the problem. Can you try removing the executable and running |
Oh, don't worry, I'm not looking for support with my weird use case -- I just wanted to point out that, even if the file is actually on disk, you will get a "file not found" when trying to execute it if the file is linking to the wrong libc. It's an actively unhelpful error message. |
Now this is happening (after installing musl-devel?):
|
|
I'm currently trying to install libstdc++ but the HDD is overloaded at the moment... My LD_LIBRARY_PATH is empty.... |
You should not need to install musl \o/
I rephrase If you don't have musl on your system, the executable is wrong and a different executable should be downloaded by recognize upon installation. |
But that didn't happen? I never removed musl unless it was automatically removed. |
What didn't happen? If you are using Fedora and not running nextcloud in docker, you don't have musl on your system. If you installed it after the fact to make recognize work, that's the wrong approach. Recognize should work out of the box without musl. If the node executable says it wants musl than recognize downloaded the wrong executable. |
And how can I fix this? |
Where did you get that from? Make sure that you use a node.js executable that actually works on your system. You should be able to find out via google how to install node.js on your system. Then set the node.js path in recognize to that node executable |
Describe the bug
Recognize does not classify anything. It fails.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
It should do its job
Recognize (please complete the following information):
Server (please complete the following information):
Additional context
The text was updated successfully, but these errors were encountered: