getting error: bash: ./autogen.sh: No such file or directory
The syntax you are using
./name-of-file
runs an executable in the current working directory. If you cannot see name-of-file
with ls -a
it will fail with the error you saw, and if it does not have execute permission for the user running the command, it will fail with permission denied
(if there are no x bits set at all, and you try running it with sudo
, the fail message will be command not found
)
The program you are trying to compile uses the cmake
method to set up the build environment, and there is evidently no autogen.sh
(or configure
) script to run.
I just successfully built this release from the GitHub page you linked to. It was straightforward, and I didn't encounter any problems.
First you need to install all the dependencies for the build. I'm not sure if all this is actually required, but you mentioned needing some of it anyway...
sudo apt install build-essential automake dh-autoreconf libusb-1.0-0-dev cmake g++
make a directory at the location shown in your screenshot (open a terminal and cd /ARMToolchains/stlink-master
if necessary... why aren't you building in your home directory? I recommend moving the whole directory to $USER
, but anyway...) the basic method is
mkdir build
cd build
cmake ..
When that exits successfully, you can run
make
If that exists successfully, you may run
sudo make install
To move the binaries to the correct locations. If not, you can run them from the current directory. If you can't get the version you've already downloaded to build (this happens quite often when cloning the master as it might be in the process of getting tweaked), then download one of the releases (like the one I linked above) and try again.
Related videos on Youtube
abinjacob
Updated on September 18, 2022Comments
-
abinjacob over 1 year
Need to install st-linkv2 in eclipse for stm32f4 programming.
automake, dh-autoreconf, libusb-1.0-0-dev are required for st-linkv2.
Terminal looks like this:
abin@abin-Compaq-Presario-C700-Notebook-PC:~/ARMToolchains/stlink-master$ ls -a . debian LICENSE .travis.sh .. doc Makefile .travis.yml .appveyor.yml etc README.md usr build flashloaders scripts .version ChangeLog.md .github src cmake .gitignore stlinkv1_macosx_driver CMakeLists.txt include tests $ ./autogen.sh bash: ./autogen.sh: No such file or directory $ whereis automake automake: /usr/share/man/man1/automake.1.gz $ ./configure bash: ./configure: No such file or directory $ sudo apt-get install automake [sudo] password for abin: Reading package lists... Done Building dependency tree Reading state information... Done automake is already the newest version. 0 upgraded, 0 newly installed, 0 to remove and 18 not upgraded. $ whereis autoconf autoconf: /usr/bin/autoconf /usr/share/autoconf /usr/share/man/man1/autoconf.1.gz $ whereis libusb-1.0-0-dev libusb-1: /usr/include/libusb-1.0
I have downloaded the source from here on GitHub.
I've been blindly following this You Tube video which shows how to use Eclipse in Linux for STMboard programming and dumping the code into the board. The maker of the video performs the operation I'm trying to do at 8:37.
OS is Ubuntu 15.04, 32-bit.
I would like to know how to compile this. I also want to understand why we use methods like
./autogen.sh
and other commands.-
steeldriver about 7 yearsWhy do you think you should be running
./autogen.sh
? based on the directory contents in your screenshot, the software's build system appears to becmake
rather than GNU autotools. -
Chai T. Rex about 7 yearsPlease don't use screenshots for text. Instead, copy and paste the text into your question, select the text, and press the
{}
button in the editor. -
abinjacob about 7 years@ChaiT.Rex done !
-
abinjacob about 7 years@steeldriver do not know why but would want to know the reasons.
-
abinjacob about 7 years@Zanna edited and details are added, please check!
-
steeldriver about 7 yearsAccording to the stlink compiling manual it should be sufficient to run
make release
from the top-level directory - which should create abuild
directory and run the necessarycmake
andmake
commands to configure and build the installation. -
abinjacob about 7 years@steeldriver i tried the command please check:
abin@abin-Compaq-Presario-C700-Notebook-PC:~/ARMToolchains/stlink-master$ make release [RELEASE] make[1]: *** No targets specified and no makefile found. Stop. Makefile:27: recipe for target 'release' failed make: *** [release] Error 2 abin@abin-Compaq-Presario-C700-Notebook-PC:~/ARMToolchains/stlink-master$
-
-
abinjacob about 7 yearsThat's a clean answer, amazing. Anyhow in process i got this
/home/abin/ARMToolchains/stlink-master# apt install build-essential automake dh-autoreconf libusb-1.0-0-dev cmake g++ The following extra packages will be installed: cmake-data Suggested packages: codeblocks eclipse ninja-build The following NEW packages will be installed: cmake cmake-data 0 upgraded, 2 newly installed, 0 to remove and 18 not upgraded. Need to get 3,324 kB of archives. After this operation, 16.4 MB of additional disk space will be used. Do you want to continue? [Y/n]
-
abinjacob about 7 yearsAll works fine, but for make install
abin@abin-Compaq-Presario-C700-Notebook-PC:~/ARMToolchains/stlink-master$ pwd /home/abin/ARMToolchains/stlink-master abin@abin-Compaq-Presario-C700-Notebook-PC:~/ARMToolchains/stlink-master$ sudo make install make: *** No rule to make target 'install'. Stop.
-
Zanna about 7 yearsHmm @abinjacob maybe you can run the executables from where they are... not at my box, so not sure
-
abinjacob about 7 yearsdon't leave like that , please answer
-
Zanna about 7 years@abinjacob I can't test it or look into it because I'm not at my machine now, I'm at work. I will take a look later :S
-
abinjacob about 7 yearsgives hope , peace gn :)
-
Zanna about 7 years@abinjacob it works for me like so --> paste.ubuntu.com/24083002 see the install_manifest.txt inside the directory for where the files should go. I can only suggest you try the release version (linked in my answer) download it to your
~/Downloads
directory and build from there. If that doesn't work, I have no idea, because I can't reproduce your problem :( Sorry! -
Zanna about 7 years@abinjacob however, when you try it like this, you can copy and paste the output from all commands here and put the link to your paste here and I can take a look
-
abinjacob about 7 yearsWhat is the "release version" mentioned in your comment.
-
Zanna about 7 yearsI installed a release from GitHub rather than cloning the master click here to download it @abinjacob
-
abinjacob about 7 yearsmake install did run, in build folder. It did work!! it was not running before because i used "cmake" instead of "cmake .." .What is the significance of ".."?
-
Zanna about 7 yearsit signifies the parent directory, where the CMakeFiles are located. Glad you got it working! @abinjacob