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
Содержание
- make: *** [generate] Error 127
- 1. Fast solution
- 2. Reproduce the problem
- Step 1: Clone a GO operator-sdk project from GitHub
- Step 2: Run make generate and get the error
- Step 3: Verify operator-sdk version
- 3. Fix the problem for now
- Step 1: Uninstall operator-sdk we installed with brew
- Makefile install error 127 when running MINGW64 #722
- Comments
- What are the steps to reproduce this issue?
- What happens?
- What were you expecting to happen?
- What versions of software are you using?
- make: *** [install] Error 127 /bin/bash: ./runInstaller: No such file or directory #5
- Comments
- Footer
- Error 127? — problem compiling model #160
- Comments
make: *** [generate] Error 127
Maybe you will get the following error when you try to work with a go operator-sdk project you cloned from GitHub.
Here we see that simply the bin directory with the needed controller-gen , kustomize and setup-envtest files, wasn’t created by operator-sdk commands.
This blog post does address that topic for a macOS operating system and is structured in following sections:
- Fast solution
- Reproduce the problem
- Fix the problem
1. Fast solution
In short words we need just to copy the bin directory from an existing operator-sdk project we have on our machine and past it into the cloned project and it will work for our cloned project.
But we will have problems, when we create new projects with that installation setup using brew install operator-sdk .
(even when this is my preferred way 😦 because I want to avoid FATA[0009] failed to create API: unable to run post-scaffold tasks of “base.go.kubebuilder.io/v3”: exit status 2)
2. Reproduce the problem
We are using the currently available operator SDK version 19.1.0 which we installed using brew as described in the operator-sdk documentation.
Step 1: Clone a GO operator-sdk project from GitHub
Step 2: Run make generate and get the error
As we will see, there are files and bin folder missing.
bin/controller-gen: No such file or directory
Step 3: Verify operator-sdk version
Ensure you have operator-sdk version: «v1.19.1» installed.
3. Fix the problem for now
We are using an Operator SDK version that worked before, in my case I used 18.0.0 successfully some time ago. As far as I remember, golang version 1.17.6 was related to operator-sdk 18.0.0 version.
Note: If you want to install an older Operator SDK version with brew, that won’t work as there is only one brew formulae, as I found out. I hope that the brew installation will be fixed in the future.
So, we will do the following sequence to fix the problem:
- Uninstall the operator-sdk we installed with brew
- Install operator-sdk 18.0.0 using the binaries and install golang in version go 1.17.6
- Verify does the creation of a new operator project now include the bin and the related files
Step 1: Uninstall operator-sdk we installed with brew
Follow the steps outlined in one of my blog posts, but only for uninstalling. The current version of the operator-sdk in brew is 1.19.1 .
Источник
Makefile install error 127 when running MINGW64 #722
What are the steps to reproduce this issue?
- Open Git Bash (MINGW64) on Windows 10 Pro
- Run git clone https://github.com/sobolevn/git-secret.git git-secret
- Run cd git-secret
- Run make build
- Run PREFIX=»/usr/local» make install
What happens?
Error 127 shows up:
What were you expecting to happen?
The git-secret tool should be installed successfully.
What versions of software are you using?
Operating system: MINGW64_NT-10.0-19042 BENNY-RYZEN 3.1.7-340.x86_64 2020-10-23 13:08 UTC x86_64 Msys (Windows 10 Pro)
git-secret path: no git-secret
git-secret version: no git-secret
git version: git version 2.29.2.windows.3
Shell type and version: GNU bash, version 4.4.23(1)-release (x86_64-pc-msys)
gpg version: gpg (GnuPG) 2.2.25
The text was updated successfully, but these errors were encountered:
This might be different on Win. Can you please try to use this command instead (make sure to use tabs for indentation, Makefile requires that):
Will this work for you?
I exchanged the lines of code but running make build still returns:
Try make git-secret
Ok, then the problem is in build , not in git-secret 🤔
For now, you can just replace make build with make git-secret . But, I will provide a fix right now! 👍
@bennycode please, reopen if that still does not work for you 🙏
Hi @sobolevn and thank you for taking immediate action. Unfortunately, I still cannot install git-secret .
Here is what I did:
1. Running git pull :
2. Running make git-secret :
3. Running make build :
4. Running PREFIX=»/usr/local» make install :
Am I holding it wrong? 🤔
Looks like it happens due to spaces in your path:
C:/Program Files/Git/usr/bin/sh.exe ./utils/install.sh «C:/Program Files/Git/usr/local»
/usr/bin/sh: C:/Program: No such file or directory
I am not sure what to do here 🤔
I will try to google some solutions. In the meantime can you try to create an alias for sh without spaces?
Thank you @sobolevn. I think I am beginning to understand what happens here. I am passing PREFIX=»/usr/local» to make install and /usr/local becomes «C:/Program Files/Git/usr/local» with MINGW64 on my machine.
The Makefile then executes $ ./utils/install.sh «$$» where PREFIX is C:/Program Files/Git/usr/local . Since this is wrapped in quotation marks it should be okay. The assumption now is that SHELL resolves to C:/Program Files/Git/usr/bin/sh.exe which seems to break. Would it help putting $ also in quotation marks?
@bennycode I don’t have any win system to test this, so you tell me 🙂
I tested it and actually it does the trick (find my PR here: #724)! 😀
Now we are one step further. 🥳
The errors I am receiving now are related to directory permissions (another Windows-specific issue):
Thanks a lot, @bennycode! Would you be interested in helping us setting up windows CI? 🙏
Hey @sobolevn, I am very happy that you haven’t let me down and that you want to create a pleasant user experience for Windows users. I will think about how to extend your CI setup to include Windows in the testing matrix. 💭
For now, I just want to confirm that I can install «git-secret» just fine when starting my Git Bash with administrator privileges (to get write permissions to «‘C:/Program Files/Git/usr/local»):
Here is everything that it takes:
Now that my problem is resolved, I am closing this issue. See you in another PR! 😀
Источник
make: *** [install] Error 127 /bin/bash: ./runInstaller: No such file or directory #5
I get this error when I run make
$ make all
33[32mInstalling Oracle Database software. 33[0m
Unable to find image ‘bofm/oracle12c:preinstall’ locally
preinstall: Pulling from bofm/oracle12c
a3ed95caeb02: Pull complete
4164c8cc49b7: Pull complete
6a54cbaa2f35: Pull complete
a8482cde7cad: Pull complete
80fd503b7647: Pull complete
cf214770b793: Pull complete
0d5d1e8a3a13: Pull complete
d62732ebc72a: Pull complete
07354f4227e1: Pull complete
bab3fa98616c: Pull complete
Digest: sha256:7e8043881e932f40e0b5c916faa5dda121186bc93d653969ff216e46e37a2aa5
Status: Downloaded newer image for bofm/oracle12c:preinstall
/bin/bash: ./runInstaller: No such file or directory
make: *** [install] Error 127
The text was updated successfully, but these errors were encountered:
- download linuxamd64_12102_database_1of2.zip and linuxamd64_12102_database_2of2.zip from oracle.comand extract the archives to current directory.
- Execute the following lines in bash and wait
© 2023 GitHub, Inc.
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Источник
Error 127? — problem compiling model #160
Does anyone know what Error 127 means? Suddenly none of my models are compiling anymore. The only thing I have done differently is running NONMEM locally on my machine this last week. Does this have something to do with competition between compilers — an issue discussed recently on NMusers? I desperately need a fix by Tuesday even if it means removing NONMEM. Thanks
See below error message
`Compiling pkpd . C:/Users/WILLJ107/DOCUME 1/R/R-32 1.2/etc/x64/Makeconf:204: warning: overriding commands for target .m.o
C:/Users/WILLJ107/DOCUME 1/R/R-32 1.2/etc/x64/Makeconf:197: warning: ignoring old commands for target .m.o
g++ -m64 -shared -s -static-libgcc -o pkpd-mread-source.dll pkpd-mread-source-win.def pkpd-mread-source.o -Ld:/RCompile/r-compiling/local/local320/lib/x64 -Ld:/RCompile/r-compiling/local/local320/lib -LC:/Users/WILLJ107/DOCUME 1/R/R-32 1.2/bin/x64 -lR
g++ -m64: not found
make: *** [pkpd-mread-source.dll] Error 127
Warning message:
running command ‘make -f «C:/Users/WILLJ107/DOCUME 1/R/R-32 1.2/etc/x64/Makeconf» -f «C:/Users/WILLJ107/DOCUME 1/R/R-32 1.2/share/make/winshlib.mk» SHLIB_LDFLAGS=’$(SHLIB_CXXLDFLAGS)’ SHLIB_LD=’$(SHLIB_CXXLD)’ SHLIB=»pkpd-mread-source.dll» WIN=64 TCLBIN=64 OBJECTS=»pkpd-mread-source.o»‘ had status 2
Error: There was a problem when compiling the model.
`
The text was updated successfully, but these errors were encountered:
It means R can’t find the compiler. I’m on my phone right now. Will post
some suggestions as soon as I can get to computer. But the solution is to
get Rtools stuff to the front of your path.
On Nov 5, 2016 09:51, «JasonW000» notifications@github.com wrote:
Does anyone know what Error 127 means? Suddenly none of my models are
compiling anymore. The only thing I have done differently is running NONMEM
locally on my machine this last week. Does this have something to do with
competition between compilers — an issue discussed recently on NMusers? I
desperately need a fix by Tuesday even if it means removing NONMEM. Thanks
See below error message
Compiling pkpd . C:/Users/WILLJ107/DOCUME 1/R/R-32 1.2/etc/x64/Makeconf:204:
warning: overriding commands for target.m.o’
C:/Users/WILLJ107/DOCUME1/R/R-321.2/etc/x64/Makeconf:197: warning:
ignoring old commands for target `.m.o’
g++ -m64 -shared -s -static-libgcc -o pkpd-mread-source.dll
pkpd-mread-source-win.def pkpd-mread-source.o -Ld:/RCompile/r-compiling/local/local320/lib/x64
-Ld:/RCompile/r-compiling/local/local320/lib -LC:/Users/WILLJ107/DOCUME
1/R/R-321.2/bin/x64 -lR
g++ -m64: not found
make: *** [pkpd-mread-source.dll] Error 127
Warning message:
running command ‘make -f «C:/Users/WILLJ107/DOCUME1/R/R-321.2/etc/x64/Makeconf»
-f «C:/Users/WILLJ107/DOCUME1/R/R-321.2/share/make/winshlib.mk»
SHLIB_LDFLAGS=’$(SHLIB_CXXLDFLAGS)’ SHLIB_LD=’$(SHLIB_CXXLD)’
SHLIB=»pkpd-mread-source.dll» WIN=64 TCLBIN=64
OBJECTS=»pkpd-mread-source.o»‘ had status 2
Error: There was a problem when compiling the model.
Start R and check your PATH
Find out where your Rtools is located; for me it is c:RBuildToools3.3
Force that onto the front of your path:
Note there are two directories that you need at the front of the path. And obviously enter paths that are appropriate for your Rtools install. You can put this in a file called .Rprofile in your Sys.getenv(«HOME») directory and it will automatically configure your R environment variable without touching your Windows system environment variables. I would prefer doing all of this through an .Renviron file (see ?Startup ) but it’s a little harder to setup. It seems like there is a battle between NONMEM and R for rights to the path and it will always be a little tricky to keep everyone happy. The process here let’s your have control over the R environment. There is some coding to do, but at least you know exactly what is happening and what gets priority in the PATH .
You should see Rtools stuff at the front.
This code worked perfectly — the two directories moved up to the front of the list in PATH and all my models are compiling again. I haven’t tried the second approach but will try it when I have some more time. Thank you very much!
Thanks for reporting back and glad it got straightened out. I know this is an ongoing battle for people running multiple compilers on a single machine.
I have a Windows box now that I’m reserving for testing mrgsolve and I hope to get some best practices tested and documented to help in situations like this.
Hi Kyle,
I have the same issue, and tried your recommendation above, but it still fails to compile model. Any help is greatly appreciated.
mod 1/R/R-35 1.1/include» -DNDEBUG -I»C:/Users/kenuj/Documents/R/win-library/3.5/mrgsolve/base» -I»C:/Users/kenuj/Documents/R/win-library/3.5/mrgsolve/models» -O2 -Wall -mtune=generic -c irm1-mread-source.cpp -o irm1-mread-source.o
sh: c:/RBuildTools/3.4/mingw_64/bin/g++: No such file or directory
make: *** [C:/PROGRA 1/R/R-35 1.1/etc/x64/Makeconf:215: irm1-mread-source.o] Error 127
Error: there was a problem building the model.
sessionInfo()
R version 3.5.1 (2018-07-02)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows >= 8 x64 (build 9200)
Matrix products: default
locale:
[1] LC_COLLATE=English_United States.1252 LC_CTYPE=English_United States.1252
[3] LC_MONETARY=English_United States.1252 LC_NUMERIC=C
[5] LC_TIME=English_United States.1252
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] bindrcpp_0.2.2 forcats_0.3.0 stringr_1.3.1 dplyr_0.7.8
[5] purrr_0.2.5 readr_1.2.1 tidyr_0.8.2 tibble_1.4.2
[9] ggplot2_3.1.0 tidyverse_1.2.1 mrgsolve_0.8.12.9000
loaded via a namespace (and not attached):
[1] Rcpp_1.0.0 cellranger_1.1.0 pillar_1.3.0
[4] compiler_3.5.1 plyr_1.8.4 bindr_0.1.1
[7] tools_3.5.1 jsonlite_1.5 lubridate_1.7.4
[10] nlme_3.1-137 gtable_0.2.0 lattice_0.20-35
[13] pkgconfig_2.0.2 rlang_0.3.0.1 cli_1.0.1
[16] rstudioapi_0.8 yaml_2.2.0 haven_2.0.0
[19] RcppArmadillo_0.9.200.5.0 withr_2.1.2 xml2_1.2.0
[22] httr_1.3.1 hms_0.4.2 grid_3.5.1
[25] tidyselect_0.2.5 glue_1.3.0 R6_2.3.0
[28] readxl_1.1.0 modelr_0.1.2 magrittr_1.5
[31] backports_1.1.2 scales_1.0.0 rvest_0.3.2
[34] assertthat_0.2.0 colorspace_1.3-2 stringi_1.2.4
[37] lazyeval_0.2.1 munsell_0.5.0 broom_0.5.0
[40] crayon_1.3.4
Error: there was a problem building the model.
After rebuilding PATH to bring RTools stuff to the from, but it looks like I have two gcc. I tried gcc-4.6.3 first, and that didn’t work, so I tried gcc-4.9.3. still didn’t work.
str_split(Sys.getenv(«PATH»), «;»)
[[1]]
[1] «C:RBuildTools3.4bin»
[2] «C:RBuildTools3.3gcc-4.6.3bin»
[3] «C:RBuildTools3.4bin»
[4] «C:RBuildTools3.3gcc-4.9.3bin»
[5] «C:RBuildTools3.4bin»
[6] «C:RBuildTools3.3gcc-4.9.3bin»
[7] «C:Program FilesRR-3.5.1binx64»
[8] «C:Program Files (x86)InteliCLS Client»
[9] «c:Rtoolsbin»
[10] «C:RBuildTools3.4bin»
[11] «C:RBuildTools3.4mingw_32bin»
[12] «C:ProgramDataOracleJavajavapath»
[13] «C:Program FilesInteliCLS Client»
[14] «C:Windowssystem32»
[15] «C:Windows»
[16] «C:WindowsSystem32Wbem»
[17] «C:WindowsSystem32WindowsPowerShellv1.0»
[18] «C:Program Files (x86)NVIDIA CorporationPhysXCommon»
[19] «C:Program Files (x86)HID GlobalActivClient»
[20] «C:Program FilesHID GlobalActivClient»
[21] «C:WINDOWSsystem32»
[22] «C:WINDOWS»
[23] «C:WINDOWSSystem32Wbem»
[24] «C:WINDOWSSystem32WindowsPowerShellv1.0»
[25] «C:WINDOWSSystem32OpenSSH»
[26] «C:Program FilesIntelWiFibin»
[27] «C:Program FilesCommon FilesIntelWirelessCommon»
[28] «C:Program Files (x86)IntelIntel(R) Management Engine ComponentsDAL»
[29] «C:Program FilesIntelIntel(R) Management Engine ComponentsDAL»
[30] «C:Program Files (x86)IntelIntel(R) Management Engine ComponentsIPT»
[31] «C:Program FilesIntelIntel(R) Management Engine ComponentsIPT»
[32] «C:Program FilesMiKTeX 2.9miktexbinx64»
[33] «C:Program FilesPythonPython37Scripts»
[34] «C:Program FilesPythonPython37»
[35] «C:Program FilesScripts»
[36] «C:Program Files»
[37] «C:UserskenujAppDataLocalMicrosoftWindowsApps»
[38] «»
Does this path exist?
c:/RBuildTools/3.4/mingw_64/bin/g++
You might just start over and re-install. That should get the compilers in the right place and get the path set. Remember, you might have to opt in to get the path set right by the installer.
This is weird. It was working fine all day, but all of a sudden it stopped and gave me the error.
I uninstalled and reinstalled with RTools 3.5. I think RTools 3.5 no longer added to path. When I run:
It still shows version 3.4 in path as followed:
[1] «C:Program FilesRR-3.5.1binx64»
[2] «C:Program Files (x86)InteliCLS Client»
[3] «c:Rtoolsbin»
[4] «C:RBuildTools3.4bin»
[5] «C:RBuildTools3.4mingw_32bin»
[6] «C:ProgramDataOracleJavajavapath»
[7] «C:Program FilesInteliCLS Client»
[8] «C:Windowssystem32»
[9] «C:Windows»
.
Should I reinstall RTools 3.4?
It’s worth a try.
That didn’t work.
Not sure where the problem is.
What exactly did you do?
Where are your tools installed?
Did you opt in to the path update when you installed?
What is your path currently saying?
Can you undo everything and just start over?
I just did a windows install from scratch using 3.5 and it worked fine . first try. I’m not sure what is going on with your system either. Happy to look with you. But can’t help with out more information about what you are doing and what the status is.
What exactly did you do?
- mrgsolve worked fine for some times, until all of a sudden it couldn’t build model. It start to work on and off. Meaning sometimes I opened up Rstudio, running mrgsolve, it worked fine, other times not. Weird. Then I thought the path might have been messed up. I reset the path as suggested above. Nothing worked since.
Where are your tools installed?
- I uninstalled RTools, then reinstalled it. Tried both version 3.4 and 3.5, neither one worked.
Did you opt in to the path update when you installed?
- Yes. I keep on having this problem since last year. I can remember every single step to check the path box during installation. Here’s the output from CMD prompt:
C:Userskenuj>path
**PATH=C:Rtoolsbin;**C:Program Files (x86)InteliCLS Client;C:ProgramDataOracleJavajavapath;C:Program FilesInteliCLS Client;C:Windowssystem32;C:Windows;C:WindowsSystem32Wbem;C:WindowsSystem32WindowsPowerShellv1.0;C:Program Files (x86)NVIDIA CorporationPhysXCommon;C:Program Files (x86)HID GlobalActivClient;C:Program FilesHID GlobalActivClient;C:WINDOWSsystem32;C:WINDOWS;C:WINDOWSSystem32Wbem;C:WINDOWSSystem32WindowsPowerShellv1.0;C:WINDOWSSystem32OpenSSH;C:Program FilesIntelWiFibin;C:Program FilesCommon FilesIntelWirelessCommon;C:Program Files (x86)IntelIntel(R) Management Engine ComponentsDAL;C:Program FilesIntelIntel(R) Management Engine ComponentsDAL;C:Program Files (x86)IntelIntel(R) Management Engine ComponentsIPT;C:Program FilesIntelIntel(R) Management Engine ComponentsIPT;C:Program FilesMiKTeX 2.9miktexbinx64;C:Program FilesPythonPython37Scripts;C:Program FilesPythonPython37;C:Program FilesScripts;C:Program Files;C:UserskenujAppDataLocalMicrosoftWindowsApps;
What is your path currently saying?
- from R, using str_split(Sys.getenv(«PATH»), «;»)
- RTools is not at the front.
[1] «C:Program FilesRR-3.5.1binx64»
[2] «C:Rtoolsbin»
[3] «C:Program Files (x86)InteliCLS Client»
[4] «C:ProgramDataOracleJavajavapath»
[5] «C:Program FilesInteliCLS Client»
[6] «C:Windowssystem32»
[7] «C:Windows»
[8] «C:WindowsSystem32Wbem»
[9] «C:WindowsSystem32WindowsPowerShellv1.0»
[10] «C:Program Files (x86)NVIDIA CorporationPhysXCommon»
[11] «C:Program Files (x86)HID GlobalActivClient»
[12] «C:Program FilesHID GlobalActivClient»
[13] «C:WINDOWSsystem32»
[14] «C:WINDOWS»
[15] «C:WINDOWSSystem32Wbem»
[16] «C:WINDOWSSystem32WindowsPowerShellv1.0»
[17] «C:WINDOWSSystem32OpenSSH»
[18] «C:Program FilesIntelWiFibin»
[19] «C:Program FilesCommon FilesIntelWirelessCommon»
[20] «C:Program Files (x86)IntelIntel(R) Management Engine ComponentsDAL»
[21] «C:Program FilesIntelIntel(R) Management Engine ComponentsDAL»
[22] «C:Program Files (x86)IntelIntel(R) Management Engine ComponentsIPT»
[23] «C:Program FilesIntelIntel(R) Management Engine ComponentsIPT»
[24] «C:Program FilesMiKTeX 2.9miktexbinx64»
[25] «C:Program FilesPythonPython37Scripts»
[26] «C:Program FilesPythonPython37»
[27] «C:Program FilesScripts»
[28] «C:Program Files»
[29] «C:UserskenujAppDataLocalMicrosoftWindowsApps»
[30] «»
Can you undo everything and just start over?
- Yes, I did everything over like 5 times. Uninstalled everything, R and R studio, and RTools.
- Reinstalled everything according to your website.
- I checked Windows environment variables, RTools is at the top as well. But not from R.
sessionInfo()
R version 3.5.1 (2018-07-02)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows >= 8 x64 (build 9200)
Matrix products: default
locale:
[1] LC_COLLATE=English_United States.1252 LC_CTYPE=English_United States.1252 LC_MONETARY=English_United States.1252
[4] LC_NUMERIC=C LC_TIME=English_United States.1252
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] forcats_0.3.0 stringr_1.3.1 dplyr_0.7.8 purrr_0.2.5 readr_1.2.1 tidyr_0.8.2 tibble_1.4.2
[8] ggplot2_3.1.0 tidyverse_1.2.1
loaded via a namespace (and not attached):
[1] Rcpp_1.0.0 cellranger_1.1.0 pillar_1.3.0 compiler_3.5.1 plyr_1.8.4 bindr_0.1.1 tools_3.5.1
[8] jsonlite_1.5 lubridate_1.7.4 nlme_3.1-137 gtable_0.2.0 lattice_0.20-35 pkgconfig_2.0.2 rlang_0.3.0.1
[15] cli_1.0.1 rstudioapi_0.8 yaml_2.2.0 haven_2.0.0 bindrcpp_0.2.2 withr_2.1.2 xml2_1.2.0
[22] httr_1.3.1 hms_0.4.2 grid_3.5.1 tidyselect_0.2.5 glue_1.3.0 R6_2.3.0 readxl_1.1.0
[29] modelr_0.1.2 magrittr_1.5 backports_1.1.2 scales_1.0.0 rvest_0.3.2 assertthat_0.2.0 colorspace_1.3-2
[36] stringi_1.2.4 lazyeval_0.2.1 munsell_0.5.0 broom_0.5.0 crayon_1.3.4
Источник
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
Maybe you will get the following error when you try to work with a go operator-sdk
project you cloned from GitHub.
Here we see that simply the bin
directory with the needed controller-gen
, kustomize
and setup-envtest
files, wasn’t created by operator-sdk commands.
This blog post does address that topic for a macOS
operating system and is structured in following sections:
- Fast solution
- Reproduce the problem
- Fix the problem
1. Fast solution
In short words we need just to copy the
bin
directory from an existing operator-sdk project we have on our machine and past it into the cloned project and it will work for our cloned project.
But we will have problems, when we create new projects with that installation setup using brew install operator-sdk
.
(even when this is my preferred way 😦 because I want to avoid FATA[0009] failed to create API: unable to run post-scaffold tasks of “base.go.kubebuilder.io/v3”: exit status 2)
I created a GitHub issue.
2. Reproduce the problem
We are using the currently available operator SDK version 19.1.0 which we installed using brew as described in the operator-sdk documentation.
Step 1: Clone a GO operator-sdk project from GitHub
git clone https://github.com/thomassuedbroecker/multi-tenancy-frontend-operator.git cd multi-tenancy-frontend-operator/frontendOperator
Step 2: Run make generate and get the error
- Example output:
As we will see, there are files and bin folder missing.
bin/controller-gen: No such file or directory
... go: added sigs.k8s.io/yaml v1.3.0 /multi-tenancy-frontend-operator/frontendOperator/bin/controller-gen object:headerFile="hack/boilerplate.go.txt" paths="./..." bash: /Users/thomassuedbroecker/Downloads/dev/verify/multi-tenancy-frontend-operator/frontendOperator/bin/controller-gen: No such file or directory make: *** [generate] Error 127
Step 3: Verify operator-sdk version
- Example output:
Ensure you have operator-sdk version: "v1.19.1"
installed.
operator-sdk version: "v1.19.1", commit: "079d8852ce5b42aa5306a1e33f7ca725ec48d0e3", kubernetes version: "v1.23", go version: "go1.18.1", GOOS: "darwin", GOARCH: "amd64"
3. Fix the problem for now
We are using an Operator SDK version that worked before, in my case I used 18.0.0 successfully some time ago. As far as I remember, golang version 1.17.6 was related to operator-sdk 18.0.0 version.
Note: If you want to install an older Operator SDK version with brew, that won’t work as there is only one brew formulae, as I found out. I hope that the brew installation will be fixed in the future.
So, we will do the following sequence to fix the problem:
- Uninstall the
operator-sdk
we installed with brew - Install
operator-sdk 18.0.0
using the binaries and install golang in versiongo 1.17.6
- Verify does the creation of a new operator project now include the
bin
and the related files
Step 1: Uninstall operator-sdk
we installed with brew
Follow the steps outlined in one of my blog posts, but only for uninstalling. The current version of the operator-sdk in brew is 1.19.1
.
YOUR_USER=YOUR_USER sudo go clean -cache brew uninstall operator-sdk brew uninstall go sudo rm -rf /usr/local/Cellar/go sudo rm -rf /usr/local/go sudo rm -rf /Users/$YOUR_USER/go
Step 2: Install operator-sdk 18.0.0
and goland 1.17.6 using the binaries¶
Here we follow the related operator-sdk documentation.
1. Create a folder for your downloads
mkdir operator-sdk cd operator-sdk
2. Set platform information
export ARCH=$(case $(uname -m) in x86_64) echo -n amd64 ;; aarch64) echo -n arm64 ;; *) echo -n $(uname -m) ;; esac) export OS=$(uname | awk '{print tolower($0)}')
3. Download the binary for your platform
export OPERATOR_SDK_DL_URL=https://github.com/operator-framework/operator-sdk/releases/download/v1.18.0 curl -LO ${OPERATOR_SDK_DL_URL}/operator-sdk_${OS}_${ARCH}
4. Install the release binary in your PATH
chmod +x operator-sdk_${OS}_${ARCH} && sudo mv operator-sdk_${OS}_${ARCH} /usr/local/bin/operator-sdk
5. Download go 1.17.6
https://go.dev/dl/go1.17.6.darwin-amd64.pkg
6. Install go 1.17.6
using the downloaded file
7. Verify the installed operator-sdk and golang version
- Example output:
operator-sdk version: "v1.18.0", commit: "c9c61b6921b29d731e64cd3cc33d268215fb3b25", kubernetes version: "1.21", go version: "go1.17.7", GOOS: "darwin", GOARCH: "amd64"
3. Confirm that creating a new operator project now contains the bin and associated files
Let us just create an example project problemfix
.
Step 1: Create a new empty folder outside the cloned project¶
cd .. mkdir fixproblem cd fixproblem
Step 2: Run operator-sdk init
operator-sdk init --domain myproblemfix.net --repo github.com/myproblemfix/myproblemfix
- Example output:
... go: downloading github.com/kr/text v0.2.0 go: downloading gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 go: downloading github.com/cespare/xxhash v1.1.0 Next: define a resource with: $ operator-sdk create api
Step 2: Create an API¶
operator-sdk create api --group myproblemfix --version v1alpha1 --kind Myproblemfix --resource --controller
- Example output:
... Next: implement your new API and generate the manifests (e.g. CRDs,CRs) with: $ make manifests
Step 3: Run make generate
make generate make manifest make build
Step 3: Verify the bin folder
and the needed files were created¶
fixproblem % tree . ├── Dockerfile ├── Makefile ├── PROJECT ├── api │ └── v1alpha1 │ ├── groupversion_info.go │ ├── myproblemfix_types.go │ └── zz_generated.deepcopy.go ├── bin │ ├── controller-gen │ ├── kustomize │ └── manager ├── config │ ├── crd │ │ ├── bases │ │ │ └── myproblemfix.myproblemfix.net_myproblemfixes.yaml │ │ ├── kustomization.yaml │ │ ├── kustomizeconfig.yaml │ │ └── patches │ │ ├── cainjection_in_myproblemfixes.yaml │ │ └── webhook_in_myproblemfixes.yaml │ ├── default │ │ ├── kustomization.yaml │ │ ├── manager_auth_proxy_patch.yaml │ │ └── manager_config_patch.yaml │ ├── manager │ │ ├── controller_manager_config.yaml │ │ ├── kustomization.yaml │ │ └── manager.yaml │ ├── manifests │ │ └── kustomization.yaml │ ├── prometheus │ │ ├── kustomization.yaml │ │ └── monitor.yaml │ ├── rbac │ │ ├── auth_proxy_client_clusterrole.yaml │ │ ├── auth_proxy_role.yaml │ │ ├── auth_proxy_role_binding.yaml │ │ ├── auth_proxy_service.yaml │ │ ├── kustomization.yaml │ │ ├── leader_election_role.yaml │ │ ├── leader_election_role_binding.yaml │ │ ├── myproblemfix_editor_role.yaml │ │ ├── myproblemfix_viewer_role.yaml │ │ ├── role.yaml │ │ ├── role_binding.yaml │ │ └── service_account.yaml │ ├── samples │ │ ├── kustomization.yaml │ │ └── myproblemfix_v1alpha1_myproblemfix.yaml │ └── scorecard │ ├── bases │ │ └── config.yaml │ ├── kustomization.yaml │ └── patches │ ├── basic.config.yaml │ └── olm.config.yaml ├── controllers │ ├── myproblemfix_controller.go │ └── suite_test.go ├── go.mod ├── go.sum ├── hack │ └── boilerplate.go.txt └── main.go
Summary¶
With that we ensure you have a working version. Now you can try to install different operator-sdk binaries if they work with the golang 1.17.6 related to operator development.
I hope this was useful to you and let’s see what’s next?
Greetings,
Thomas
#operatorsdk, #macos, #golang, #operators
- Печать
Страницы: [1] Вниз
Тема: Проблемы с makefile (Прочитано 3961 раз)
0 Пользователей и 1 Гость просматривают эту тему.

6epreu
Всем добрый день.
Имеется makefile слудеющего содержания, лежащий вместе с исходными файлами (main.c, list.s, list.h)
PATH=/usr/local
PROGRAM=result
COMPILE=gcc -c
LINK=gcc -o
$(PROGRAM): main.o list.o
$(LINK) $(PROGRAM) main.o list.o
main.o: main.c
$(COMPILE) main.c
list.o: list.c
$(COMPILE) list.c
install:
cp -f $(PROGRAM) $(PATH)
При выполлении команды make в консоли получается следующее:
make: gcc: Команда не найдена
make: *** [main.o] Ошибка 127
В чем собственно дело?

yorik1984
make: gcc: Команда не найдена
вам же все написали. Нет компилятора gcc
sudo apt-get install gcc

wl
лучше ставить build-essential
помимо голого компилятора надо еще библиотеки, заголовки, итдитп.
На свете феньки есть такие, брат Горацио, которых лохи просто не секут. (Шекспир, «Гамлет», вольный перевод)

6epreu
Прошу прощения, что не упомянул самого главного.
«gcc» со всеми библиотеками стоит.
Пользователь решил продолжить мысль 28 Июня 2011, 14:48:20:
к тому же отдельно компилирую файлы в консоли
gcc -c main.c
Все выполняется и так же линкуется
gcc -o result main.o list.o
« Последнее редактирование: 28 Июня 2011, 14:48:20 от 6epreu »

wl
Тогда такого не может быть.
Проверьте, что там все буквы латинские, нигде русской «эс» не затесалось.
что скажет команда
which gcc
?
что скажет команда
gcc main.c list.c -o result
?
Кстати, в цели install у Вас файл копируется в /usr/local, а надо бы в /usr/local/bin
Ну и выполнять эту цель надо от sudo
sudo make install
Тьфу, бллин!
Ну вот скажите, накой Вам понадобилось PATH переопределять?!
INSTALLDIR = /usr/local
PROGRAM = result
COMPILE = gcc -c
LINK = gcc -o
$(PROGRAM): main.o list.o
$(LINK) $(PROGRAM) main.o list.o
main.o: main.c
$(COMPILE) main.c
list.o: list.c
$(COMPILE) -c list.c
install:
cp -f $(PROGRAM) $(INSTALLDIR)
И все работает!
Вообще говоря, так, как Вы, никто не делает.
Если уж понадобилось определить все в переменных, надо различать компилятор и его ключи.
И стандартные имена переменных для таких случаев тоже есть: $CC, $CXX, $CFLAGS, $CXXFLAGS, $LDFLAGS
« Последнее редактирование: 28 Июня 2011, 15:23:14 от wl »
На свете феньки есть такие, брат Горацио, которых лохи просто не секут. (Шекспир, «Гамлет», вольный перевод)

6epreu
что скажет команда
Код:
which gcc
?
говорит следующее: /usr/bin/gcc
что скажет команда
Код:
gcc main.c list.c -o result
?
Уже упоминал об этом выше. Если просто компилировать без makefile, то компилятор выполняет свою работу корректно.
Кстати, в цели install у Вас файл копируется в /usr/local, а надо бы в /usr/local/bin
Ну и выполнять эту цель надо от sudo
По поводу пути не особо важно, а выполняю от sudo.
Тьфу, бллин!
Ну вот скажите, накой Вам понадобилось PATH переопределять?!
Вот тут виноват! А собственно за что отвечает PATH?
Объясните пжалуйста, ибо makefile я решил написать чисто для себя, чтобы в чужих makefile ах можно было ковыряться и понимать приблизительно, что там происходит.
Спасибо, за ответ!!! Попробовал у себя makefile с INSTALLDIR = /usr/local тоже все работат)

wl
Тьфу, бллин!
Ну вот скажите, накой Вам понадобилось PATH переопределять?!Вот тут виноват! А собственно за что отвечает PATH?
Переменная окружения PATH задает список директорий, в которых находятся исполняемые файлы.
Попробуйте в командной строке написать
echo $PATH
Пока я не заметил этого, пробовал задать
COMPILE = /usr/bin/gcc
gcc нашелся и запустился, но заявил что не может найти as
Makefiles, кстати, уже почти не пишутся руками. Чаще они генерируются автоматически.
Так что рекомендую ознакомиться с системами build automation.
Наиболее распространенная сейчас — autotools (порождающая здоровенный скрипт configure, тоже, кстати, автогенерированный из configure.ac и Makefile.am). На пятки ей наступает CMake.
В педивикии можно найти более полный список.
« Последнее редактирование: 29 Июня 2011, 11:06:13 от wl »
На свете феньки есть такие, брат Горацио, которых лохи просто не секут. (Шекспир, «Гамлет», вольный перевод)

6epreu
нет, если писать COMPILE = /usr/bin/gcc то прокатывает.
Про PATH понял, это такой же PATH как и в винде.
А за обзор софта для генерации мэйков — спасибо. Сам под UNIX пока не пишу, но в скором времени предстоит.
В частности написание собственного makefile было нужно, чтобы разобраться в чужом.

RazrFalcon
Про PATH понял, это такой же PATH как и в винде.
Приблизительно

wl
нет, если писать COMPILE = /usr/bin/gcc то прокатывает.
Если в начале задается PATH, а потом COMPILE=/usr/bin/gcc , то прокатывает только вызов gcc.
Сам gcc пытается запустить as, но не находит его и объектного файла не создает.
Про PATH понял, это такой же PATH как и в винде.
1. Отличие в том, что в линуксе в пути не может быть точки (текущей директории).
Точнее, ее можно туда руками добавить, но это неправильно, у меня bash в ответ на каждую команду ругался, мол, у вас там точка в пути.
Если пути не указано, исполняемые файлы ищутся только в директориях, перечисленных в PATH. Чтобы запустить файл из текущей надо писать ./a.out
2. PATH — это только для исполняемых файлов.
Динамические библиотеки, в отличие от винды, ищутся в путях, указанных в /etc/ld.so.conf и в переменной LD_LIBRARY_PATH
Подробности в man ld.so
« Последнее редактирование: 29 Июня 2011, 13:25:59 от wl »
На свете феньки есть такие, брат Горацио, которых лохи просто не секут. (Шекспир, «Гамлет», вольный перевод)

6epreu
2. PATH — это только для исполняемых файлов.
Динамические библиотеки, в отличие от винды, ищутся в путях, указанных в /etc/ld.so.conf и в переменной LD_LIBRARY_PATH
Подробности в man ld.so
Опять же спасибо, вот этого не знал!
- Печать
Страницы: [1] Вверх
0
I am trying to make a program (hisat2) from the source code through Ubuntu. When I do, I get an error 127 and it says the following:
/bin/sh: 1: /usr/bin/g++: not found
Makefile:273: recipe for target 'hisat2-build-s' failed
make: *** [hisat2-build-s] Error 127
The folder with g++.exe is already added to path. I am a newbie so I was wondering if someone can guide me.
- ubuntu
- make
- g++
Improve this question
asked May 15, 2020 at 0:04
studentstudent
1
0
Add a comment
|
1 Answer
Sorted by:
Reset to default
1
Use the Ubuntu hisat2 package.
Improve this answer
answered May 16, 2021 at 14:40
community wiki
Jeff Schaller
Add a comment
|
Your Answer
Sign up or log in
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Name
Required, but never shown
By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy
Not the answer you’re looking for? Browse other questions tagged
- ubuntu
- make
- g++
or ask your own question.
Not the answer you’re looking for? Browse other questions tagged
- ubuntu
- make
- g++
or ask your own question.