LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 10-13-2019, 10:34 AM   #1
bashnotfound901
LQ Newbie
 
Registered: Oct 2019
Posts: 8

Rep: Reputation: Disabled
Bash commands not working


Hey! I am new to raspberry pie and I am trying to install vscode onto raspberrypie so I encountered problems with bash
here is my output on echo$PATH
"/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/games:/usr/games:/snap/bin:/home/vivek/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games"

I am providing this to make you able to spoonfeed me. Please understand my situation and help me past this,
BTW I am trying to compile vscode by this command
"./scripts/npm.sh install --arch=armhf"
and it gives me output
"bash: ./scripts/npm.sh: No such file or directory"

Thanks in advance!
 
Old 10-13-2019, 10:49 AM   #2
teckk
LQ Guru
 
Registered: Oct 2004
Distribution: Arch
Posts: 5,137
Blog Entries: 6

Rep: Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826
Quote:
I am providing this to make you able to spoonfeed me
Nope. You'll need to do it.

What is the output of
Code:
ls /scripts/npm.sh
Do you have a directory called scripts? And a file named npm.sh in it?
Quote:
"bash: ./scripts/npm.sh: No such file or directory"
Says it can't find that file.

How about some info on what you are trying to do. How you tried to do it. What you are using. Isn't npm in your distros repository?
 
Old 10-13-2019, 10:58 AM   #3
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,804

Rep: Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306
No, bash is working as expected. You need to understand the reply: it does not find the file you specified. Probably it is located somewhere else.
 
Old 10-13-2019, 02:36 PM   #4
MadeInGermany
Senior Member
 
Registered: Dec 2011
Location: Simplicity
Posts: 2,781

Rep: Reputation: 1199Reputation: 1199Reputation: 1199Reputation: 1199Reputation: 1199Reputation: 1199Reputation: 1199Reputation: 1199Reputation: 1199
If
Code:
./scripts/npm.sh install --arch=armhf
says "not found" then check it with
Code:
ls ./scripts/npm.sh
If it exists, then check its shebang with
Code:
head ./scripts/npm.sh
The interpreter after the #! must exist.
 
Old 10-13-2019, 05:27 PM   #5
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: Somewhere in my head.
Distribution: Slackware (15 current), Slack15, Ubuntu studio, MX Linux, FreeBSD 13.1, WIn10
Posts: 10,342

Rep: Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242
try
Code:
sudo find / -type f -name npm.sh
to see if it is even anywhere on your system.
if no then maybe go back and get it again?
https://code.visualstudio.com/download

Last edited by BW-userx; 10-13-2019 at 05:37 PM.
 
Old 10-14-2019, 12:56 AM   #6
bashnotfound901
LQ Newbie
 
Registered: Oct 2019
Posts: 8

Original Poster
Rep: Reputation: Disabled
[QUOTE=teckk;6046548]Nope. You'll need to do it.

What is the output of
Code:
ls /scripts/npm.sh
/QUOTE]
cannot access '/scripts/npm.sh': No such file or directory

No i dont have scripts file!
 
Old 10-14-2019, 12:59 AM   #7
bashnotfound901
LQ Newbie
 
Registered: Oct 2019
Posts: 8

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by MadeInGermany View Post
If
Code:
./scripts/npm.sh install --arch=armhf
says "not found" then check it with
Code:
ls ./scripts/npm.sh
If it exists, then check its shebang with
Code:
head ./scripts/npm.sh
The interpreter after the #! must exist.
I got the following output

pi@raspberrypi:~/vscode $ head ./scripts/npm.sh
#!/bin/bash

yarn $*pi@raspberrypi:~/vscode $
 
Old 10-14-2019, 01:01 AM   #8
bashnotfound901
LQ Newbie
 
Registered: Oct 2019
Posts: 8

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by pan64 View Post
No, bash is working as expected. You need to understand the reply: it does not find the file you specified. Probably it is located somewhere else.
Yeah whats the way out of it?
 
Old 10-14-2019, 01:22 AM   #9
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,804

Rep: Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306
in post #6 there is a mistake, that should be ./scripts/npm.sh (the leading dot is very important).
From the other hand based on the answers you posted probably the execute flag is missing from that file, so chmod +x ./scripts/npm.sh will help.
ls -l .scripts/npm.sh may give more information.
 
Old 10-14-2019, 01:56 AM   #10
bashnotfound901
LQ Newbie
 
Registered: Oct 2019
Posts: 8

Original Poster
Rep: Reputation: Disabled
UPDATE

i am past that problem but now I encounter this
pi@raspberrypi:~/vscode $ ./scripts/npm.sh install --arch=armhf
yarn install v1.12.3
warning You are using Node "4.2.1" which is not supported and may encounter bugs or unexpected behavior. Yarn supports the following semver range: "^4.8.0 || ^5.7.0 || ^6.2.2 || >=8.0.0"
$ node build/npm/preinstall.js
error Couldn't find the binary node build/npm/preinstall.js
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
linux bashnotfound901 is online now
 
Old 10-14-2019, 01:58 AM   #11
bashnotfound901
LQ Newbie
 
Registered: Oct 2019
Posts: 8

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by pan64 View Post
in post #6 there is a mistake, that should be ./scripts/npm.sh (the leading dot is very important).
From the other hand based on the answers you posted probably the execute flag is missing from that file, so chmod +x ./scripts/npm.sh will help.
ls -l .scripts/npm.sh may give more information.
bash: -l: command not found
 
Old 10-14-2019, 02:25 AM   #12
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,804

Rep: Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306
so you made a mistake again. that should be: ls -l ./scripts/npm.sh. I mistyped (a missing /) too.
Again, you need to learn how bash works. This is the way out.
Now another file is missing. Probably you are in a different directory, or mistyped something or ???
 
Old 10-14-2019, 02:28 AM   #13
bashnotfound901
LQ Newbie
 
Registered: Oct 2019
Posts: 8

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by pan64 View Post
so you made a mistake again. that should be: ls -l ./scripts/npm.sh. I mistyped (a missing /) too.
Again, you need to learn how bash works. This is the way out.
Now another file is missing. Probably you are in a different directory, or mistyped something or ???
What exactly is the command? That can help you help me?
 
Old 10-14-2019, 02:45 AM   #14
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,804

Rep: Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306
I have no idea what are you trying to do, what have you done already, what did you mistype accidentally so I cannot tell you the next step.
 
Old 10-14-2019, 07:56 AM   #15
teckk
LQ Guru
 
Registered: Oct 2004
Distribution: Arch
Posts: 5,137
Blog Entries: 6

Rep: Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826
You are trying to install npm. Doesn't that exist in your distos repository?
Code:
pacman -Si npm
...
Name            : npm
Version         : 6.10.3-1
Description     : A package manager for javascript
...
URL             : https://www.npmjs.com/
...
Depends On      : nodejs  node-gyp  semver
Optional Deps   : None
Conflicts With  : None
Replaces        : None
Download Size   : 2.89 MiB
Installed Size  : 16.14 MiB
...
It looks like /home/bashnotfound901/npm.sh exists on your box. Is the script executable?

I think that you are going to have a mess real quick trying to install software like that. Find a package for it and use your package manager to install it.

What linux are you using? Is there a package for npm in the repo?
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] In terminal (bash), when you've run commands, and then you press the up arrow and all the commands are there, how to > to a text file. bk328115 Linux - Newbie 4 08-03-2018 10:57 PM
[SOLVED] autocomplete of bash is not working for some commands mitter1989 Linux - Newbie 4 05-01-2014 04:50 AM
How to end the bash script using commands in bash not manually by pressing ctrl+c Sanpreet Singh Linux - Newbie 1 07-03-2013 01:04 PM
Where are BASH commands stored? Not scripts but what bash exe uses. theKbStockpiler Programming 11 02-23-2011 03:06 PM
Running bash but common bash commands not working michellepace Linux - Newbie 11 07-17-2010 09:19 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 05:18 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration