No such file or directory but it exists
This error can mean that ./arm-mingw32ce-g++
doesn't exist (but it does), or that it exists and is a dynamically linked executable recognized by the kernel but whose dynamic loader is not available. You can see what dynamic loader is required by running ldd /arm-mingw32ce-g++
; anything marked not found
is the dynamic loader or a library that you need to install.
If you're trying to run a 32-bit binary on an amd64 installation:
- Up to Ubuntu 11.04, install the package
ia32-libs
. - On Ubuntu 11.10, install
ia32-libs-multiarch
. - Starting with 12.04, install
ia32-libs-multiarch
, or select a reasonable set of:i386
packages in addition to the:amd64
packages.
Bash: No such file or directory when running shell comands with node.js spawn on linux
Hello, I don't know why I decided to try to fix this since I know just a little bit about coding (only scripting actually lol) and nothing about nodeJs but I got fun testing your app with the help of my friend google !
First of all, since i dont have your minecraft files (jar etc.), I just writed a little script "test.sh", that will just echo your command:
❯ cat test.sh
#!/bin/bash
echo "java -Xmx5G -jar /home/linux username here/nasServer/GameServers/minecraft/1.16.2\ server/spigot-1.16.2.jar nogui"
second of all after like 2hours of training, modifying, testing by adding/deleting stuff into your app to understand how it works, I finally came back to your original app when i find that it works with this:
http://localhost:3000/run?file=test.sh
here is the browser output (as expected):
{"out":""}
here is the console output:
❯ node 71963151.js
App listening on port 3000
stdout: java -Xmx5G -jar /home/linux username here/nasServer/GameServers/minecraft/1.16.2\ server/spigot-1.16.2.jar nogui
child process exited with code 0
The fact is that when we remove the double quotes from the query it works fine, but when I add back the double quotes like you are trying to do:
http://localhost:3000/run?file="test.sh"
here is the browser output (as expected):
{"out":""}
but here is the consol output:
❯ node 71963151.js
App listening on port 3000
stderr: bash: "test.sh": No such file or directory
child process exited with code 127
So, to conclude, instead of trying to run this on your browser:
http://127.0.0.1:3000/run?file="/home/<linux username here>/nasServer/GameServers/minecraft/<1.16.2 server>/run.sh"
try this:
http://127.0.0.1:3000/run?file=/home/<linux username here>/nasServer/GameServers/minecraft/<1.16.2 server>/run.sh
A lot of documentation helped me out to understand the way nodejs works, I loved doing this :p thank you, You made me want to code!
bguess.
Why do I get a no such file or directory error in this Bash script?
Instead of launching sh test.sh
, you should launch sh test.sh <input_file>
, like this, your input parameter $1
will be filled in.
bash no abash: /src/github.com/tomnomnom/gf/gf-completion.bash: No such file or directory
The problem was an old code in his ~/.bashrc
file which was found by grep -Fre gf-completion.bash /etc/ ~/.bashrc*
:
/root/.bashrc:source $GOPATH/src/github.com/tomnomnom/gf/gf-completion.bash
Related Topics
Flags in Objdump Output of Object File
Bash Alias Create File with Current Timestamp in Filename
Does 'Dash' Support 'Bash' Style Arrays
How to Fetch the Tags for Ec2-Describe-Instances in a Shell Script
Unterminated Address Regex While Using Sed
Cmake Set Environment Variable
How to Initialize the Attribute Group Correctly for a Platform Driver
Nginx Loadbalancer Too Many Open Files
How to Autocomplete a Bash Commandline with File Paths
Passing Arguments to a Script Invoked with Bash -C
How Do Programs Communicate with Each Other
Chef Chef-Validator.Pem Security
Linux Kernel API Changes/Additions
Analyzing CPU Registers During Kernel Crash Dump
Linux: Handling a Segmentation Fault and Getting a Core Dump
How to Do a One Way Diff in Linux
Block Device Information Without Mounting in Linux
Fixing the Line-Endings in a Git Repository Using the '.Gitattributes' File