Ошибка 127 линукс

I’m new to Linux and trying to install mktorrent (latest version) and the README file states to simply run the ‘make’ command while in the directory. However, after trying 3 different terminals/emulators I would receive the same error as shown quoted below.

I’ve tried install «automake» from repositories as suggested through other answers found on here/Google with no luck. Here are the directory contents: https://i.stack.imgur.com/KlAsg.png

cc -O2 -Wall prefix.c -o prefix make: cc: Command not found make:
*** [prefix] Error 127

  • linux
  • ubuntu
  • terminal
  • makefile

asked Jun 20, 2015 at 7:04

MerKury's user avatar

MerKuryMerKury

831 gold badge1 silver badge3 bronze badges

2

  • Looks like the command cc does not exist on your system. That would be the c compiler.

    Jun 20, 2015 at 7:07

  • If you have gcc but not cc, check if it will compile successfully with gcc. You can modify Makefile to change cc to gcc.

    Jun 20, 2015 at 7:33

1 Answer

sudo apt-get install build-essential

should install the requirements for compiling C/C++ based applications

answered Jun 20, 2015 at 7:31

Uku Loskit's user avatar

Uku LoskitUku Loskit

40.9k9 gold badges93 silver badges94 bronze badges

0

I’m new to Linux and trying to install mktorrent (latest version) and the README file states to simply run the ‘make’ command while in the directory. However, after trying 3 different terminals/emulators I would receive the same error as shown quoted below.

I’ve tried install «automake» from repositories as suggested through other answers found on here/Google with no luck. Here are the directory contents: https://i.stack.imgur.com/KlAsg.png

cc -O2 -Wall prefix.c -o prefix make: cc: Command not found make:
*** [prefix] Error 127

  • linux
  • ubuntu
  • terminal
  • makefile

asked Jun 20, 2015 at 7:04

MerKury's user avatar

MerKuryMerKury

831 gold badge1 silver badge3 bronze badges

2

  • Looks like the command cc does not exist on your system. That would be the c compiler.

    Jun 20, 2015 at 7:07

  • If you have gcc but not cc, check if it will compile successfully with gcc. You can modify Makefile to change cc to gcc.

    Jun 20, 2015 at 7:33

1 Answer

sudo apt-get install build-essential

should install the requirements for compiling C/C++ based applications

answered Jun 20, 2015 at 7:31

Uku Loskit's user avatar

Uku LoskitUku Loskit

40.9k9 gold badges93 silver badges94 bronze badges

0

Terminals are very powerful, regardless of what operating system you’re using. This means that while you can perform just about any OS task with a few commands, you need to know these commands to take advantage of them. Of course, different operating systems use different languages in their terminals as well, meaning you need to decide to have mastery over one or use multiple.

In this article, we’re talking about Make error 127, its causes and what you can do to fix the problem.


What causes Make error 127?

The Make error 127 generally occurs when you’re working with a Go operator-sdk project cloned from Github as the command doesn’t generate the bin directory with the required files to run the Make installation. 

As for code 127, it simply indicates a “command not found” error. Since the initial command hasn’t generated the files required, the Make installation fails as the system can’t find the source files to run or read the command.

Also read: How to fix ‘wget command not found’ issue in Bash?


Depending on what’s causing your error, here are two fixes you can try out.

Reinstall a different version of the Operator-SDK

First up, if the problem is being caused by operator-sdk, we can try either rolling back to version 18.0.0 or pushing forward to the latest version available (assuming the latest version has fixed the bug. 

How Facebook's AI is trying to assist suicide prevention

All you have to do is uninstall operator-sdk using brew or apt-get or whatever package manager you’re using. Once that’s done, we reinstall a different version (either version 18.0.0 or the latest one) as well as the latest version of Go. Keep in mind that if you’re using version 18.0.0 of operator-sdk, we recommend installing version 1.17.6 of Go. 

Finally, check if the bin folder has now been created and if it has, you can go ahead and run your Make installation without any errors. 


Check your PATH variables

Since error 127 also indicates that a command or file required to run a command is missing, try checking your PATH variable to see if the command exists there. Alternatively, a simpler way of doing this is opening a terminal in the root directory of whatever command you want to run and then run the problematic command. 

Also read: Fix: Error:03000086:digital envelope routines::initialization error

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

I am trying to teach myself gnuMake after learning the basics of C++

I am running Ubuntu 14.04 equivalent (elementary os)

And I am getting the error (full output of make run):

g++ ./main.o -w  -o test
This is a test!
/bin/sh: 1: This: not found
make: *** [exe] Error 127

My Makefile:

CC=g++
SRC=$(shell find -name '*.cpp')
OBJS= $(SRC:.cpp=.o)
EXEC=test
FLAGS= -w
LINKS=

%.o: %.cpp
    $(CC) -c $*.cpp -o $*.o

$(EXEC): $(OBJS)
    $(CC) $(OBJS) $(FLAGS) $(LINKS) -o $(EXEC)

all: $(EXEC)

exe: 
    $(shell ./$(EXEC))

run: all exe

clean: 
    rm -rf *.o $(EXEC)

This is a combination of taking basic make tutorials and reading Makefiles in github

main.cpp:

#include <iostream>

using namespace std;

int main()
{
    cout << "This is a test!" << endl;

    return 0;
}

Pretty Basic, but will be extending it to help learn to use and extend my Makefile. Now I can see the program compiles and runs, but I get the error after the run.

I searched for Make error 127 and that seems to output that error for many things, but I did not see a definition for the error, or a similar issue to mine.

Понравилась статья? Поделить с друзьями:
  • Ошибка 127 корел дро
  • Ошибка 127 андроид
  • Ошибка 127 winscp
  • Ошибка 127 dota 2 windows 10
  • Ошибка 127 3d max