Avatar billede fredand Forsker
29. november 2004 - 17:43 Der er 3 kommentarer og
1 løsning

How to run a newly compiled program?

Hello!

I have downloaded a program called ctorrent for torrent file sharing.

I seems like I have manage to compile it. But I can not run it even if I stand in the folder where the ctorrent-executebale is.

I have tried to run it like:
[root@Stationary ctorrent-1.3.2]ctorrent
(ENTER)
bash: ctorrent: command not found

Do I have to configure some paths or anything else?

Best regards
Fredrik

PS I use Mandrake 8.1
Avatar billede lap Nybegynder
29. november 2004 - 17:52 #1
[root@Stationary ctorrent-1.3.2] ./ctorrent

and path is the problem - you don't have path to current dir :-)
Avatar billede fredand Forsker
29. november 2004 - 17:58 #2
Hmm!

Ok how do I set the path?

And I guess after I have set the path I can type ./ctorrent from any dir, is that correct?

Is it always like this you start a program:
./any_program_name_that_I_would_like_to_start

Best
regards

BTW please give svar so I can reward you mate!
Avatar billede lap Nybegynder
29. november 2004 - 18:02 #3
you can set the path in /etc/profile (just add to existing) or in command prompt:

PATH=$PATH:<new_dir> export PATH

You run a program in current directory with ./ - it's just as "../<program name>" - a directory path
Avatar billede erikjacobsen Ekspert
29. november 2004 - 18:53 #4
Generally it is not a good idea to add "." to your PATH. When you change
directories you cannot be sure what program is executed when you enter the name.
Avatar billede Ny bruger Nybegynder

Din løsning...

Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.

Loading billede Opret Preview
Kategori
IT-kurser om Microsoft 365, sikkerhed, personlig vækst, udvikling, digital markedsføring, grafisk design, SAP og forretningsanalyse.

Log ind eller opret profil

Hov!

For at kunne deltage på Computerworld Eksperten skal du være logget ind.

Det er heldigvis nemt at oprette en bruger: Det tager to minutter og du kan vælge at bruge enten e-mail, Facebook eller Google som login.

Du kan også logge ind via nedenstående tjenester