'bash: make: command not found' on windows after setting environment variable - windows

I need to install make command on windows, and I am told to follow the guide here: https://gist.github.com/evanwill/0207876c3243bbb6863e65ec5dc3f058#make, which is quoted as follows:
Go to ezwinports.
Download make-4.1-2-without-guile-w32-bin.zip (get the version without guile).
Extract zip.
Copy the contents to your Git\mingw64\ merging the folders, but do NOT overwrite/replace any existing files.
(Keep in mind you can easy add make, but it doesn't come packaged with all the standard UNIX build toolchain--so you will have to ensure those are installed and on your PATH, or you will encounter endless error messages.)
But after finishing those steps (extract zip and merging the folders), I run the make command and get a bash: make: command not found error.
I have added 'C:\Program Files\Git\mingw64\bin' to my PATH environment variable and have confirmed that file 'make.exe' exists in 'C:\Program Files\Git\mingw64\bin'.
I find one or two similar problems asked under the comments of the guide website, but they just haven't get answers;
and I also find some answers on stackOverFlow that says using choco install make instead, but I'm not sure if these two packages are the same.
Can you give me some suggestions to fix this?

Related

WSL Not able to find file or directory due to space

The error I was originally getting was that wsl was not able to find JAVA_HOME. After I ran the command
export JAVA_HOME="/mnt/c/Program Files/JAVA/jdk-15.0.2"
And now the error it gives me is:
ERROR: JAVA_HOME is set to an invalid directory: /mnt/c/Program Files/Java/jdk-15.0.2
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation.
When I run
${JAVA_HOME}
to check the variable I get the response
bash: /mnt/c/Program: No such file or directory
Which I believe is due to the space in the file name. Online it said that the space shouldn't be an issue as it is enclosed in quotes so I don't know what to do here.
Any help would be appreciated!
It looks like you are trying to use the Windows version of Java from within WSL. That should be possible, but you are currently exporting a Linux-style path, which the Windows version won't handle (as you can see).
If you have both the Windows and Linux version of Java installed, then see this answer for some related information. The question there is about npm, but the core issue is the same -- The Windows version is getting picked up in the path before the Linux version.
If you just have the Windows version, then at least modify the JAVA_HOME to be 'C:\Program Files\JAVA\jdk-15.0.2' (watch out for potential quoting issues with backslashes in the Linux-shell string, though). I'm not sure that's going to take care of all of your issues -- I've never tried running the Windows Java version through WSL myself. But it's at least the first step you're going to need to take to get past the current error.
The second error when you just execute ${JAVA_HOME} is to be expected, as you are trying to execute this directory (with a space) as a command. The shell is interpreting the portion before the space as a command, and the portion after the space as the argument. If you were to set it to a directory without a space, you'd still get an error message when trying to execute it (as you are now), just that it would be something like bash: /mnt/c: Is a directory.
If you just want to check it, use echo ${JAVA_HOME}.

Installation of VCPKG followed by any call to "vcpkg install" results in "Changing the working dir failed"

When I follow the steps in the VCPKG documentation page to install on Windows, the noted steps fail on the line .\bootstrap-vcpkg.bat.
Specifically, these are the steps I follow, exactly according to the instructions at the above link.
Run Powershell (not as administrator)
cd <parent_directory>
git clone https://github.com/Microsoft/vcpkg.git
cd .\vcpkg\
.\bootstrap-vcpkg.bat
.\vcpkg integrate install
All above steps (seem to) succeed, until the last (in red, below).
I see the following output:
(Note: the screenshot also shows an additional line at the end - in which I attempted to install a desired package for use in a project - which failed with the same error.)
I looked through the source code of vcpkg and found that the offending line of code looks like this (vcpkg.cpp):
Modifying the vcpkg.cpp source to display the missing path, rebuilding, and testing shows that the missing directory is:
<vcpkg>/installed/...
...But the installed directory does not exist in the vcpkg root directory.
Because I am following the basic installation instructions from the vcpkg documentation, I'm stumped as to what I am doing wrong, what is wrong in my setup, or what to do about it.
Can someone please explain why installation of VCPKG followed by any call to "vcpkg install" results in the error Changing the working dir failed?
I had mistakenly defined the VCPKG_ROOT environment variable to a directory that is a subdirectory of the root directory of the vcpkg project.
This is an easy mistake to make, as I describe below.
The vcpkg executable itself checks for the existence of the VCPKG_ROOT environment variable, and if present, uses its value to override the path to the root folder for the vcpkg project that is used internally by the running vcpkg binary.
I created an environment variable with the same name (VCPKG_ROOT) for a different purpose - so that my own downstream application could be provided the path to the include files for a library installed by vcpkg. It makes sense that I would choose the name VCPKG_ROOT, because in fact vcpkg, by default, installs libraries into a subdirectory of its own root directory.
Specifically:
If the root directory of the 'vcpkg' project is <vcpkg>...
...then by default the vcpkg executable installs libraries such that the include paths for the libraries that are installed are placed in <vcpkg>\installed\...\include\
(And other library files, such as binaries, are also placed in directories nested within <vcpkg>.)
The problem was that I defined VCPKG_ROOT to be the second bullet, not the first. So it's an easy mistake to make, given that the choice of name "VCPKG_ROOT" kind of makes sense in both scenarios!
I just suggested an improved error message via a pull request to the vcpkg project - if accepted, this might save some other poor soul the stress and lost time of tracking down this glitch.

Why won't APKTool execute?

I was using APKTool and have been doing a lot of trials, using all the versions of APKTool. However, upon to my dismay, it won't work. Whenever I use it it will just be:
-bash: ./apktool: No such file or directory
I don't know what to do, as I tried using "./" as what websites are telling me, but still it just gives me this.
What should I do to fix this error. Thanks :)
-----Edit (December 23, 2015)-------
I have found the solution to the problem and it was just a redownload of APKTool itself. It also helped when I gained an understanding of Terminal and the Command Line Tools. I advice you to do the same thing too.
Perhaps you should reinstall apktool. You can find how to do it here:
http://ibotpeaches.github.io/Apktool/install/
Using "./" means that you want to run file located in current folder. Since you mentioned "bash" your apktool should be probably installed in "/usr/local/bin" so when you complete the installation do not add "./" just type "apktool" to run it.
If you want to check where apktool is installed run "which apktool"
or simply use the apktool online: http://www.javadecompilers.com/apktool
No installation - no hassle!

configure command not found cygwin

This question has been asked many time but I am not able to resolve the problem from them so I am asking
I had installed Cygwin a few days ago.I tried using ./configure command but it says
-bash: ./configure: No such file or directory
I tried using
where configure
but I got the output
INFO: Could not find files for the given pattern(s).
then I tried grep configureand I got this output
/etc/bash_completion.d/configure
/usr/i686-pc-cygwin/sys-root/usr/share/libtool/libltdl/configure
/usr/share/ELFIO/configure
/usr/share/libtool/libltdl/configure
I tried to export the path and then run the ./configure but it also didn't worked.
I find no executable file named as configure in my cygwin bin directory.
Does it mean that I have to add configure file manually?How can I correct it?
NOTE :- I had also tried sh configure but it also didn't worked
If a software project is set up to be built using autoconf, that tool generates a script canonically called configure. It queries the system for various parameters that are subsequently used in the build, and is specific to the software package to be built. Different software projects have different configure scripts. They are all called configure, but their contents are not the same.
So, to actually build such a software project once that script was set up (usually done by the maintainers when packaging the source tarball for distribution), you call:
tar xzf <tarball>.gz # or xjf <tarball>.bz2 or whatever
cd <sourcedir> # the one you just untarred
./configure
make
make install
Note the prefix ./, which means "located in this directory" (i.e. the top directory of that project's source tree).
Actually, the better procedure is the so-called "out-of-tree build", when you set up a different directory for the binaries to be built in, so the source tree remains unmodified:
tar xzf <tarball>.gz # or xjf <tarball>.bz2 or whatever
mkdir builddir
cd builddir
../<sourcedir>/configure
make
make install
So, there is supposed to be no configure executable in your PATH, you are supposed to call the script of that name from the source tree you are trying to build from.
If I correctly understood...
Configure is not an application that should be installed on your system, but script that should be delivered with source code to prepare for make command. File named configure should be in the main directory of source code.
I understand that this is an old question. However many might find this solution helpful.
Normally we use the make command to compile a downloaded source in cygwin. In many cases it contains a autogen.sh file. Running that file with
bash autogen.sh
will in many case solve the problem. At least it solved my issue and i could then use the make command

Getting "The syntax of the command is incorrect." when running new Amazon CLI

Running Python27 on windows. Trying to run the new AWS command line interface (found here: http://aws.amazon.com/cli/) , and getting the error "The syntax of the command is incorrect." when running anything.
Even "aws help" gives this error. I know everything is installed because a regular garbage command (asdf) gives a different error.
I get the same error in powershell as in cmd.
Googling around, the error is typically encountered when renaming/moving a file that has a space in it without using quote marks. I had hoped moving my python install to c:\python27\ would fix the issue, but it has not.
Moving python to a non-space having path was the correct choice.
The aws command is a little aggressive in finding all your python installs. It searches your PATH directories for python.exe (or .bat or .cmd). I had changed this manually when I moved my python directory.
It also searches your file associations (which I had not changed) and was still finding c:\program files\python27\ and was choking on the space.
This question helped me fix the file associations, and I'm good to go now.
How do you change file association for .py Python files in XP?
If you find the aws command slightly slow, you probably speed it up by skipping all this searching nonsense and just hard coding your python.exe path into the aws.cmd file.

Resources