Make error 127 linux

Getting the error «make: [Makefile:2: all] Error 127» when I use the make command

I am trying to install this project onto my computer and have been running into issue after issue.

The roadblock I’ve run into now is error 127. Most of the install works fine, until it gets to the step «make.» I get the following output:

I have tried installing on Git Bash for Windows 10 and using the terminal in CentOS. Both give me the same error. I have tried installing cmake on CentOS, but I’m unsure what to do with it now that it is installed. I also installed MinGW onto the Windows machine, but with no luck.

I’m relatively new to Linux/Unix (and very new to Git) so if the answer is obvious, I apologize.

I have found other questions similar to this, but the answer is always something along the lines of «it is trying to build something and it can’t. need more context»

edit: Cmake is installed (as far as I can tell). I used this walk through to install it (updating the file names and stuff to correspond with the current version of cmake). The cmake directory was installed in the Downloads directory until I moved it (details below).

Someone had suggested that the cmake wasn’t in a directory accessible to the $PATH variable. I moved it into a directory that I had added to the $PATH variable a while ago, but I am still getting the same error.

Edit 2: Alright, so I installed cmake through the CentOS software app thing. The make command works now, but theres a different problem. Running the make command outputs errors. The CMakerror.log file is filled with this over and over again:

There are a bunhc of different entries like this, the only difference between them is that the Id flags bit sometimes has a «-c» but it also does «—c++» and «—ec++»

Edit 3: Here is the output from using the make command:

I checked the CMakeLists.txt file and there is, in fact a cmake_minimum_required line (It specifically says «cmake_minimum_required (VERSION 2.8)»).

Читайте также:  Github pages on windows

Edit 4: A user below suggested I may not have gcc/g++ installed. So I used this tutorial to install gcc. Now I get error 2. Progress!! The ouput of the make command is below:

Before anyone says it, yes, there is a makefile in the directory. Here is the output of ls for the directory I’m working in:

Edit 5: I renamed «Makefile» on the off chance that it was looking for «makefile» and it kinda worked. I got a new error message which is good. Kinda. make ouput below:

Edit 6(?): my problem has changed so much that I figured a new thread should be made to more accurately reflect the problem I’m dealing with. This thread is located here.

Источник

Make Error 127 when running trying to compile code

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?

1 Answer 1

Error 127 means one of two things:

  1. 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.
  2. 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:

  1. get a better binary. talk to the vendor that gave you the toolchain and ask them for one that doesn’t suck.
  2. 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.
  3. build your own cross-compiler using something like crosstool-ng.
  4. you could switch between an x86_64 & x86 install, but that seems a bit drastic ;).
Читайте также:  Realtek 8812bu linux driver

Источник

Ошибка при установке git «make: *** [configure] Error 127»

ОС XUbuntu 18.04.2 LTS 64bit, пытаюсь установит git по инструкции

скачал архив git-2.20.1.tar.gz, на шаге make configure получаю ошибку

подскажите как исправить

2 ответа 2

требуется программа autoconf из одноимённого пакета:

предупреждая следующую ошибку: чем устанавливать пакеты по одному, лучше сразу поставить «джентельменский набор» для компиляции. в debian-основных дистрибутивах это мета-пакет build-essential :

Спасибо всем за помощь! Решил сделать так, поставил на всякий случай «джентельменский набор» sudo apt install build-essential

вместо make install на будущее буду использовать checkinstall или сам собирать пакет, а пока что установлю через PPA sudo apt install git , предварительно проверив версию пакета на репозитории sudo apt-cache policy git

Всё ещё ищете ответ? Посмотрите другие вопросы с метками ubuntu makefile или задайте свой вопрос.

Похожие

Подписаться на ленту

Для подписки на ленту скопируйте и вставьте эту ссылку в вашу программу для чтения RSS.

дизайн сайта / логотип © 2021 Stack Exchange Inc; материалы пользователей предоставляются на условиях лицензии cc by-sa. rev 2021.10.8.40416

Нажимая «Принять все файлы cookie» вы соглашаетесь, что Stack Exchange может хранить файлы cookie на вашем устройстве и раскрывать информацию в соответствии с нашей Политикой в отношении файлов cookie.

Источник

Command not found, make: Error 127,

I have this make file which compiles successfully:

But when I try to run make test I get the following error:

What does this error mean?

/bin/flex_scanner /path_to_exec/flex_scanner and ln -s

/.bashrc or similar, to search for commands in the current dir.

1 Answer 1

As noted by @Brett Hale ./flex_scanner should be used:

This is explained by @Beta:

When you give a command like flex_scanner , your operating system must look for an executable by that name. It has a list of places where it looks for such things, which may or may not include «.» (for the working directory). By adding «./» you are telling the OS «don’t go hunting for something called ‘flex_scanner’, use the path I’m giving you».

Now, the PATH can me amended as explained by @JJoao:

If you are not in a hostile machine, you can add export PATH=$PATH:. to your

/.bashrc or similar, to search for commands in the current dir.

Читайте также:  Samsung usb ethernet adapter driver windows

Or the perhaps less usefully the binaries could be added to a PATH dierctory by linking as explained by @Wojciech Frohmberg:

/bin/flex_scanner /path_to_exec/flex_scanner and ln -s

Most experienced unix users would avoid having a . on their PATH as it opens up the risks of running unexpected binaries.

Источник

Eclipse Make Error 127

this is my first time using Eclipse, and my first time programming in a linux environment. So I might end up posting some semi-usless information, but I’m just trying to give what ever details I can.

The Issue: I’m trying to build a project, and I’m getting the following errors and warnings.

The Question: What would I have to do, and or get, in order to start working with c++ in linux, within an IDE? Fixing the error would be great, but the above stated is my underlying goal.

IDE Info:

OS Info:

Errors(1 item)

Warnings(2 items)

Source Code

Generated Makefile

EDIT Tried running ‘gcc -E -P -v -dD /home/xoorath/workspace/.metadata/.plugins/org.eclipse.cdt.make.core/specs.cpp’

2 Answers 2

Simple solution really. Turns out I didn’t have g++. I installed gcc, and perhapse somebody here knows the difference, if so feel free to enlighten me.

I had to go into the console and do the following

Following are the values the make returns.

0 — if all makefiles were successfully parsed and no targets that were built failed 1 — if the -q flag was used and make determines that a target needs to be rebuilt 2 — if any errors were encountered.

and any errors numbers of form,

‘[foo] Error NN’ ‘[foo] signal description’ These errors are not really make errors at all. They mean that a program that make invoked as part of a recipe returned a non-0 error code (‘Error NN’), which make interprets as failure, or it exited in some other abnormal fashion (with a signal of some type).

If no * is attached to the message, then the subprocess failed but the rule in the makefile was prefixed with the — special character, so make ignored the error.

So, here the case of make returning the value of 127, is returned by the shell not from make. Please refer man page of bash.

Источник

Оцените статью