This semester I got this new subject where we get to work with Discovery STM32 F4, and we are still in the phase of setting it up. But I have this problem in the beginning.
When I try to compile this «blink» code I get this error:
So, as I got it so far, we are using this shortcut command «make» to compile code, and we were given instruction to set it up as it’s shown in images below:
Can anyone see what’s the problem here?
Paolo
18k6 gold badges33 silver badges62 bronze badges
asked Apr 1, 2016 at 20:59
4
Error 127
means one of two things:
- file not found: the path you’re using is incorrect. double check that the program is actually in your
$PATH
, or in this case, the relative path is correct — remember that the current working directory for a random terminal might not be the same for the IDE you’re using. it might be better to just use an absolute path instead. - ldso is not found: you’re using a pre-compiled binary and it wants an interpreter that isn’t on your system. maybe you’re using an x86_64 (64-bit) distro, but the prebuilt is for x86 (32-bit). you can determine whether this is the answer by opening a terminal and attempting to execute it directly. or by running
file -L
on/bin/sh
(to get your default/native format) and on the compiler itself (to see what format it is).
if the problem is (2), then you can solve it in a few diff ways:
- get a better binary. talk to the vendor that gave you the toolchain and ask them for one that doesn’t suck.
- see if your distro can install the multilib set of files. most x86_64 64-bit distros allow you to install x86 32-bit libraries in parallel.
- build your own cross-compiler using something like crosstool-ng.
- you could switch between an x86_64 & x86 install, but that seems a bit drastic ;).
answered Apr 2, 2016 at 1:02
Mike FrysingerMike Frysinger
2,6901 gold badge21 silver badges24 bronze badges
2
I attempted to follow this guide to run a Node application as a service. However, it is failing to start, with exit code 127. Is there any way to fix this?
This is the journal.
sudo journalctl --follow -u serviceName
-- Logs begin at Tue 2017-08-08 16:27:10 GMT. --
Aug 08 17:06:57 raspberrypi systemd[1]: Started serviceName.
Aug 08 17:06:57 raspberrypi app.js[7234]: [46B blob data]
Aug 08 17:06:57 raspberrypi systemd[1]: serviceName.service: main process exited, code=exited, status=127/n/a
Aug 08 17:06:57 raspberrypi systemd[1]: Unit serviceName.service entered failed state.
Aug 08 17:06:57 raspberrypi systemd[1]: serviceName.service holdoff time over, scheduling restart.
Aug 08 17:06:57 raspberrypi systemd[1]: Stopping serviceName...
Aug 08 17:06:57 raspberrypi systemd[1]: Starting serviceName...
Aug 08 17:06:57 raspberrypi systemd[1]: serviceName.service start request repeated too quickly, refusing to start.
Aug 08 17:06:57 raspberrypi systemd[1]: Failed to start serviceName.
Aug 08 17:06:57 raspberrypi systemd[1]: Unit serviceName.service entered failed state.
This is the serviceName.service.
[Unit]
Description=ServiceName
After=network.target
[Service]
ExecStart=/home/pi/projects/ServiceName/app.js
Restart=always
User=root
Group=root
Environment=PATH=/usr/bin:/usr/local/bin
Environment=NODE_ENV=production
WorkingDirectory=/home/pi/projects/ServiceName
[Install]
WantedBy=multi-user.target
This is at the top of my app.js.
#!/usr/bin/env node
asked Aug 8, 2017 at 17:35
4
ExecStart=/home/pi/projects/ServiceName/app.js
This is telling systemd
to run app.js
directly. Is this .js
file directly executable? If not, the shell will throw an exit code 127 — «Unknown command».
answered Aug 8, 2017 at 17:51
DopeGhotiDopeGhoti
71.4k8 gold badges94 silver badges132 bronze badges
3
127 is a command not found.
Make sure root user has access to node binary else change following lines with the user for which you have installed node
User=root
Group=root
Else Try following
[Unit]
Description="ServiceName"
After=network.target
[Service]
ExecStart=path_to_node/node /home/pi/projects/ServiceName/app.js
Restart=always
# Restart service after 10 seconds if node service crashes
RestartSec=10
# Output to syslog
StandardOutput=syslog
StandardError=syslog
#Change this to find app logs in /var/log/syslog
SyslogIdentifier=nodejs-api
# Followig will require if you are using the PORT or Node from Envirnoment
Environment=NODE_ENV=production PORT=3000
[Install]
WantedBy=multi-user.target
Once your server machine is up & you are not able to access server, you troubleshoot by checking logs from /var/log/syslog by the following command
sudo grep "nodejs-api" /var/log/syslog
Start on boot: sudo systemctl enable rocketch
answered May 29, 2018 at 12:04
To debug just run this (substuting the <> parts with the value from your systemd unit file:
sudo runuser -l <User> -g <Group> -c "cd <WorkingDirectory> && <PATH> <ExecStart>"
The issue is the given User
cannot access the ExecStart
within the PATH
you have set.
If anybody is still stuck I’ve written a step by step guide to: debugging systemd
answered Jun 15, 2020 at 10:21
GerryGerry
1,0109 silver badges9 bronze badges
For them who are using NVM. try this
ExecStart=/home/<you_username>/.nvm/versions/node/<node_version>/bin/node /home/<you_username>/.nvm/versions/node/<node_version>/bin/verdaccio --config /home/<you_username>/.config/verdaccio/config.yaml
answered Apr 18, 2021 at 5:35
Hey for anyone interested, I had this issue and tried everything under the sun, but in the end upgrading from Node 6 to Node 12 fixed the issue.
answered Apr 24, 2020 at 3:11
I am trying to install shc on Ubuntu 18.04
wget http://www.datsi.fi.upm.es/~frosal/sources/shc-3.8.9b.tgz
tar xvfz shc-3.8.9.tgz
cd shc-3.8.9
make
But receive the following error:
cc -Wall shc.c -o shc
make: cc: Command not found
makefile:31: recipe for target 'shc' failed
make: *** [shc] Error 127
The makefile:
# Makefile
#
INSTALL_PATH = /usr/local
# For SCO
CFLAGS = -b elf -O -D_SVID
# For IRIX
CFLAGS = -xansi -fullwarn -O3 -g0
# For Solaris
CFLAGS = -fast -xO4 -s -v -Xa
# For HPUX
CFLAGS = -Wall -O -Ae
# For OSF1
CFLAGS = -w -verbose -fast -std1 -g0
# For GNU C compiler
CFLAGS = -Wall # -O6 -pedantic
#SHELL = /bin/sh
SHCFLAGS = -v -T # Add -T option to allow binary to be traceable
all: shc ask_for_test
shc: shc.c
$(CC) $(CFLAGS) $@.c -o $@
ask_for_test:
@echo '*** �Do you want to probe shc with a test script?'
@echo '*** Please try... make test'
test: make_the_test ask_for_strings
make_the_test: match.x
@echo '*** Running a compiled test script!'
@echo '*** It must show files with substring "sh" in your PATH...'
./match.x sh
match.x: shc match
@echo '*** Compiling script "match"'
CFLAGS="$(CFLAGS)" ./shc $(SHCFLAGS) -f match
ask_for_strings:
@echo '*** �Do you want to see strings in the generated binary?'
@echo '*** Please try... make strings'
strings: make_the_strings ask_for_expiration
make_the_strings: match.x
@echo '*** Running: "strings -n 5 'match.x'"'
@echo '*** It must show no sensible information...'
strings -n 5 match.x
ask_for_expiration:
@echo '*** �Do you want to probe expiration date?'
@echo '*** Please try... make expiration'
expiration: til_yesterday ask_for_install
til_yesterday: shc match
@echo '*** Compiling "match" to expired date'
CFLAGS="$(CFLAGS)" ./shc $(SHCFLAGS) -vv -e `date "+%d/%m/%Y"` -f match
@echo '*** Running a compiled test script!'
@echo '*** It must fail showing "./match.x: has expired!"'
./match.x
ask_for_install:
@echo '*** �Do you want to install shc?'
@echo '*** Please try... make install'
install: shc
@echo '*** Installing shc and shc.1 on '$(INSTALL_PATH)
@echo -n '*** �Do you want to continue? '; read ANS; case "$$ANS" in y|Y|yes|Yes|YES) ;; *) exit 1;; esac;
install -c -s shc $(INSTALL_PATH)/bin/
install -c -m 644 shc.1 $(INSTALL_PATH)/man/man1/
clean:
rm -f *.o *~ *.x.c
cleanall: clean
rm -f shc *.x
I have no idea how to fix this error. Can anyone help?
mature
3,7199 gold badges29 silver badges64 bronze badges
asked Nov 22, 2018 at 17:24
2
cc is an alias for the GNU C compiler (gcc). You can install it as follows:
sudo apt install gcc
If, for some reason, the gcc compiler is already installed, but the symbolic link /usr/bin/cc
is missing, you can also do:
make CC=gcc
answered Nov 22, 2018 at 18:07
1
sudo apt install build-essential
This will install a C compiler (providing the cc
command) as well as other tools that you may need for building software from source.
answered Nov 22, 2018 at 19:39
MarkMark
5724 silver badges13 bronze badges
Background
I am attempting to upgrade my installed version of LND and getting this error:
make clean && make && make install
/bin/sh: 1: go: not found
/bin/sh: 1: go: not found
Cleaning source.
rm -f ./lnd-debug ./lncli-debug
rm -f ./lnd-itest ./lncli-itest
rm -f -r ./vendor .vendor-new
/bin/sh: 1: go: not found
/bin/sh: 1: go: not found
Building debug lnd and lncli.
GO111MODULE=on go build -v -tags="dev" -o lnd-debug -ldflags "-X github.com/lightningnetwork/lnd/build.Commit=queue/v1.0.1-136-g6ad8be25e1aaf4700bd86303ae534cf36c6199bf" github.com/lightningnetwork/lnd
/bin/sh: 1: go: not found
Makefile:94: recipe for target 'build' failed
make: *** [build] Error 127
Your environment
-
version of
lnd
lnd version 0.5.2-99-beta commit=v0.5.1-beta-814- g2a652455aaea661b147b6adca0ff51edcd268508
-
which operating system (
uname -a
on *Nix)
Ubuntu 16.04.6 x86_64 -
version of
btcd
,bitcoind
, or other backend
bitcoind
Steps to reproduce
Tell us how to reproduce this issue. Please provide stacktraces and links to code in question.
Following the update instructions:
To update your version of lnd to the latest version run the following commands:
cd $GOPATH/src/github.com/lightningnetwork/lnd
git pull
make clean && make && make install
Expected behaviour
I expect to be update to update LND without error message.
Actual behaviour
I get the error message indicated above.
/bin/sh: 1: go: not found
The go
binary is not in your PATH
.
@wpaulino why isn’t it? I followed the instructions exactly as written in this repo.
Check your PATH
, you may have installed Go in a slightly different directory. Also you can do which go
to find where it’s pointing to atm.
As @Roasbeef suggested, use the following command to check your path setting:
echo $GOPATH # this should point to your workspace echo $PATH go version # check go version, it should be at least 1.12 gedit ~/.profile # to modify PATH source ~/.profile # to activate changes
I also use Ubuntu so I know the struggle when configuring the Go. If all the above not working, I suggest you remove and install Go again, directly installing tar
package. Installation guide here. Following is tested and worked perfectly fine on my Ubuntu 18.04
which go # output like /usr/local/go/bin/go
rm -rvf /usr/local/go/
sudo apt-get remove golang-go
sudo apt-get remove --auto-remove golang-go
Увидели сообщение с непонятной ссылкой, спам, непристойность или оскорбление?
Воспользуйтесь ссылкой «Сообщить модератору» рядом с сообщением!
- Форум русскоязычного сообщества Ubuntu »
- Поддержка »
- Настройка системы (Модераторы: Дмитрий Бо, www777) »
- make Error 127
- Печать
Страницы: [1] Вниз
Тема: make Error 127 (Прочитано 6994 раз)
0 Пользователей и 1 Гость просматривают эту тему.

w2e
Ubuntu 12.04
трей
—————————————————————————
000@1000:~/dd/dir320$ make kernel_menuconfig
что делать? кто нить знает?
make[1]: Entering directory `/home/000/dd/dir320/target/linux'
make[2]: Entering directory `/home/000/dd/dir320/target/linux/brcm47xx'
if [ -s "/home/000/dd/dir320/build_dir/linux-brcm47xx/linux-2.6.32.27/patches/series" ]; then (cd "/home/000/dd/dir320/build_dir/linux-brcm47xx/linux-2.6.32.27"; if quilt --quiltrc=- next >/dev/null 2>&1; then quilt --quiltrc=- push -a; else quilt --quiltrc=- top >/dev/null 2>&1; fi ); fi
make[2]: *** [/home/000/dd/dir320/build_dir/linux-brcm47xx/linux-2.6.32.27/.quilt_checked] Error 127
make[2]: Leaving directory `/home/000/dd/dir320/target/linux/brcm47xx'
make[1]: *** [menuconfig] Error 2
make[1]: Leaving directory `/home/000/dd/dir320/target/linux'
make: *** [kernel_menuconfig] Ошибка 2
Пользователь решил продолжить мысль 30 Июня 2012, 16:59:41:
проблема решена не хватала пакета quilt.
« Последнее редактирование: 30 Июня 2012, 16:59:41 от w2e »

victor00000
- Печать
Страницы: [1] Вверх
- Форум русскоязычного сообщества Ubuntu »
- Поддержка »
- Настройка системы (Модераторы: Дмитрий Бо, www777) »
- make Error 127
SMF 2.0.19 |
SMF © 2011, Simple Machines | Карта форума
Страница сгенерирована за 0.095 секунд. Запросов: 25.