0

I tried to run the below command in order to procede to install a program:

$ . configure

but after few second the Ubuntu terminal close, without any message. What happened?

Thanks for your time about my issue

Soren A
  • 6,442
  • 2
  • 17
  • 33
Dario
  • 3
  • 1
  • 3
    You probably should follow description and run `./configure` instead. – Soren A Jun 19 '20 at 10:14
  • Oh by doing that you're making the **configure** script the [source](https://superuser.com/questions/46139/what-does-source-do) script in your terminal.If you want to execute the configure script in the current directory normally , you should refer to the current directory **.** followed by a **/** . Just a single dot is equal to the **source** command. – Parsa Mousavi Jun 19 '20 at 10:24
  • 3
    Does this answer your question? [What is the difference between "source x", ". x" and "./x" in Bash?](https://askubuntu.com/questions/107969/what-is-the-difference-between-source-x-x-and-x-in-bash). The example in that script is quite fitting your question ;-) – pLumo Jun 19 '20 at 10:42
  • Thanks for all comments, but now I got another problem after run ./configure – Dario Jun 19 '20 at 13:39
  • ./configure gnu Testing C++ compiler: Error: Test compile failed: g++ -Wall -O3 -o testp testp.cpp Error: Check the output below for error messages: ./configure: line 381: g++: command not found – Dario Jun 19 '20 at 13:39

1 Answers1

1

By doing that you're running the configure script in the current shell similar to exec bash -e ./configure or simply source ./configure .

Dot followed by a space is equivalent to the source command , but if you want to execute the configure script in the current directory , you have to add a slash between the dot and configure :

./configure

The bash first spawns a new shell then executes it in the child shell.But if you use the source command or . configure , you're actually executing it instead of the current bash process.So your terminal will get closed after that since there's no shell to give you a prompt.

Parsa Mousavi
  • 3,197
  • 15
  • 35
  • Thanks for all comments, but now I got another problem after run ./configure – Dario Jun 19 '20 at 15:22
  • `Testing C++ compiler: Error: Test compile failed: g++ -Wall -O3 -o testp testp.cpp Error: Check the output below for error messages: ./configure: line 381: g++: command not found` – Dario Jun 19 '20 at 15:23
  • @Dario You have to install ```g++``` for that(```sudo apt install g++```) .Please check out the required packages in the **README** or **INSTALL.md** of the program you're trying to compile to prevent future errors. – Parsa Mousavi Jun 19 '20 at 15:26
  • This time I got this: `dario@dario-VirtualBox:~/cpptraj$ ./configure No compilers specified; defaulting to gnu Testing C++ compiler: OK Testing C compiler: OK Testing Fortran compiler: OK Testing basic C++11 support: OK Testing system headers for C++11 support: OK Warning: Compilation of sanderlib requires AMBERHOME to be set Warning: if --with-sanderlib not specified. Checking BZLIB: Error: Test compile failed: g++ -Wall -O3 -std=gnu++11 -o testp testp.cpp -lbz2 Error: Check the output below for error messages: testp.cpp:2:10: fatal error: bzlib.h: ` – Dario Jun 19 '20 at 16:35
  • @Dario Which project you're trying to build? – Parsa Mousavi Jun 19 '20 at 16:44
  • I try to install cpptraj an AmberTools: https://github.com/Amber-MD/cpptraj – Dario Jun 19 '20 at 16:58
  • @Dario Please go to [this chat room to resume the discussion](https://chat.stackexchange.com/rooms/109585/compiling-the-cpptraj-project). – Parsa Mousavi Jun 19 '20 at 17:27
  • Really Thanks for you time, help and kindness. – Dario Jun 19 '20 at 17:41
  • @Dario You're welcome. And if that helped you please consider accepting the answer. – Parsa Mousavi Jun 19 '20 at 17:50