I am using Ubuntu 16.04 and found the program pgn2ltx (http://pgn2ltx.sourceforge.net/) to convert pgn-files to LaTex. I unzipped the files in a folder with the same name and created a binary file with the command make pgn2ltx. When I try to run it from the command line I get pgn2ltx: command not found. Now I don't know how to proceed from here. Regards, Michael
Asked
Active
Viewed 68 times
1
Michael Scheitz
- 13
- 4
-
1Is the binary file in the same directory as you are currently in? Did you run `make install` or did you just run the make command to build the binary? – Thomas Ward Feb 02 '18 at 23:59
-
I just used `make pgn2ltx` and when I press enter `g++ pgn2ltx.cpp -o pgn2ltx` shows in the next line. The command `make install pgn2ltx` gives `make: *** No rule to make target 'install'. Stop.` – Michael Scheitz Feb 03 '18 at 00:36
1 Answers
2
When you ran the make command it built the binary, but it didn't install it. There doesn't appear to be an install option for your program, so you need to reference the executable by referring to it with ./pgn2ltx when you are in the directory where you built the software.
The other solution is to copy the compiled executable into /home/$USER/bin (creating the folder first if it doesn't exist), and then add that directory to your $PATH with export PATH="/home/$USER/bin:$PATH" either directly on the command line yourself, or as part of your ~/.bashrc file so the changes are persistent. From there, then, the executable will be recognized as a valid program when you try and execute the software with just pgn2ltx on the command line directly.
Thomas Ward
- 72,494
- 30
- 173
- 237