Problème de compilation

Résolu/Fermé
celia - 7 févr. 2007 à 23:46
lami20j Messages postés 21331 Date d'inscription jeudi 4 novembre 2004 Statut Modérateur, Contributeur sécurité Dernière intervention 30 octobre 2019 - 8 févr. 2007 à 11:58
Bonsoir , je ne comprends pas du tout , j'ai bien installer freepascal ( j'ai mis 1 heure ) sur ma mandriva et je n'arrive pas à compiler mon fichier :
[root@lns-bzn-53-82-65-53-189 Documents]# fpc echange.pas
bash: fpc: command not found
[root@lns-bzn-53-82-65-53-189 Documents]# fpcompile echange.pas
bash: fpcompile: command not found


D'où peut venir le problème ?

merci

43 réponses

lami20j Messages postés 21331 Date d'inscription jeudi 4 novembre 2004 Statut Modérateur, Contributeur sécurité Dernière intervention 30 octobre 2019 3 567
7 févr. 2007 à 23:52
tu l'as installé comment?
il faut donner un peu de détails quand tu demandes quelque chose :-))

locate fpc 
te donne quoi?

et utilise les balises code
0
il m'est difficile de donner des précisions c'est ma 1ere installation , voilà ce que ta commande m'affiche :

# locate fpc
locate: fatal error: Could not find user database '/var/lib/slocate/slocate.db':  No such file or directory
0
lami20j Messages postés 21331 Date d'inscription jeudi 4 novembre 2004 Statut Modérateur, Contributeur sécurité Dernière intervention 30 octobre 2019 3 567
8 févr. 2007 à 00:01
Ok pour les balises code

il m'est difficile de donner des précisions c'est ma 1ere installation ,

Oui, et c'est pour ça qu'on doit savoir ce que tu as fait, puisque peut être tu n'as rien installé et tu n'as que l'impression que tu l'as installé.

Donc dit étape par étape comment tu as installer.

Voici ici un tuto pour l'installation de programmes sous Linux linux installer les programmes gestion des paquets compil
0
je suis certaine d'avoir bien installé mon package , vu que j'ai eu : end of installation . DOnc je comprends pas pq j'arrive pas à compiler...
0

Vous n’avez pas trouvé la réponse que vous recherchez ?

Posez votre question
lami20j Messages postés 21331 Date d'inscription jeudi 4 novembre 2004 Statut Modérateur, Contributeur sécurité Dernière intervention 30 octobre 2019 3 567
8 févr. 2007 à 00:16
je suis certaine d'avoir bien installé mon package , vu que j'ai eu : end of installation

Ce n'est pas parce que je ne te crois pas, mais ce n'est pas le genre d'information que j'ai besoin.

Tu ne te rappelles pas ce que tu as fait pour l'installer?
Tu as fait en ligne de commande? si oui quelle commande tu as tapé?
Tu as fait en mode graphique? si oui sur quoi tu as fait clic?

0
oui , il yavait 4 fichiers dans le programme freepascal , j'ai tapé en ligne de commande tar xvf ...çà a marché , ensuite j'ai tapé ./install.sh , et j'ai répondu yes à toutes les questions , bref tout a bien été et çà s'est terminé par end of installation et j'ai fermé mon shell .
0
lami20j Messages postés 21331 Date d'inscription jeudi 4 novembre 2004 Statut Modérateur, Contributeur sécurité Dernière intervention 30 octobre 2019 3 567
8 févr. 2007 à 00:30
tu l'as télécharger depuis quel lien?
0
lami20j Messages postés 21331 Date d'inscription jeudi 4 novembre 2004 Statut Modérateur, Contributeur sécurité Dernière intervention 30 octobre 2019 3 567
8 févr. 2007 à 00:34
Voilà ce que j'ai moi après l'exécution de install.sh, donc un peu plus de détails que tu m'as donné
lami20j@debian:~/src/fpc$ ./install.sh


















This shell script will attempt to install the Free Pascal Compiler
version 2.0.4 with the items you select

Install prefix (/usr or /usr/local)  [/home/lami20j/fpc-2.0.4] :
Installing compiler and RTL for i386-linux...
Installing utilities...
Install Textmode IDE (Y/n) ?
Install FCL (Y/n) ?
Install packages (Y/n) ?
Installing bfd
Installing cdrom
Installing fftw
Installing forms
Installing fpgtk
Installing fv
Installing gconf
Installing gdbint
Installing gdbm
Installing ggi
Installing gnome
Installing graph
Installing gtk
Installing gtk2
Installing hash
Installing ibase
Installing imlib
Installing libasync
Installing libc
Installing libgd
Installing libpng
Installing mysql
Installing ncurses
Installing netdb
Installing newt
Installing odbc
Installing opengl
Installing oracle
Installing pasjpeg
Installing paszlib
Installing postgres
Installing pthreads
Installing regexpr
Installing sqlite
Installing svgalib
Installing syslog
Installing tcl
Installing unixutil
Installing unzip
Installing utmp
Installing uuid
Installing x11
Installing zlib
Installing zvt
Done.

Install documentation (Y/n) ?
Installing documentation in /home/lami20j/fpc-2.0.4/share/doc/fpc-2.0.4 ...
Done.

Install demos (Y/n) ?
Install demos in [/home/lami20j/fpc-2.0.4/share/doc/fpc-2.0.4/examples] :
Installing demos in /home/lami20j/fpc-2.0.4/share/doc/fpc-2.0.4/examples ...
Done.

Running on linux
No write premission in /etc.
Found libgcc.a in /usr/lib/gcc/i486-linux-gnu/4.1.2
Writing sample configuration file to /home/lami20j/.fpc.cfg

End of installation.

Refer to the documentation for more information.

lami20j@debian:~/src/fpc$
0
j'ai téléchargé depuis ce lien :

http://www.freepascal.org/down/x86_64/linux-ftp.freepascal.org.var
0
lami20j Messages postés 21331 Date d'inscription jeudi 4 novembre 2004 Statut Modérateur, Contributeur sécurité Dernière intervention 30 octobre 2019 3 567
8 févr. 2007 à 00:48
Si tu as laissé les options par défaut tu dois avoir dans /home/celia un répetoire qui s'applle fpc-2.0.4

chez moi j'ai
lami20j@debian:~$ ls -l /home/lami20j | grep fpc
drwxr-xr-x  6 lami20j lami20j      4096 2007-02-08 00:32 fpc-2.0.4
et voilà pour fpc
lami20j@debian:~$ ls -l /home/lami20j/fpc-2.0.4/bin/fp*
-rwxr-xr-x 1 lami20j lami20j 4303604 2006-08-20 22:19 fpc-2.0.4/bin/fp
-rwxr-xr-x 1 lami20j lami20j   79092 2006-08-20 22:19 fpc-2.0.4/bin/fpc
-rwxr-xr-x 1 lami20j lami20j  292644 2006-08-20 22:19 fpc-2.0.4/bin/fpcmake
-rwxr-xr-x 1 lami20j lami20j  191736 2006-08-20 22:19 fpc-2.0.4/bin/fpcmkcfg
-rwxr-xr-x 1 lami20j lami20j  195628 2006-08-20 22:19 fpc-2.0.4/bin/fpcres
-rwxr-xr-x 1 lami20j lami20j  185388 2006-08-20 22:19 fpc-2.0.4/bin/fpcsubst
-rwxr-xr-x 1 lami20j lami20j  467396 2006-08-20 22:19 fpc-2.0.4/bin/fpdoc
-rwxr-xr-x 1 lami20j lami20j  203228 2006-08-20 22:19 fpc-2.0.4/bin/fppkg
-rwxr-xr-x 1 lami20j lami20j  185972 2006-08-20 22:19 fpc-2.0.4/bin/fprcp

et voilà pour la compil
lami20j@debian:~$ cat test.pas
program Test;
begin
  Writeln('Bienvenue dans GNU Pascal !');
        end.
lami20j@debian:~$ /home/lami20j/fpc-2.0.4/bin/fpc test.pas
Free Pascal Compiler version 2.0.4 [2006/08/20] for i386
Copyright (c) 1993-2006 by Florian Klaempfl
Target OS: Linux for i386
Compiling test.pas
Linking test
4 Lines compiled, 0.0 sec
et l'exécution
lami20j@debian:~$ ./test
Bienvenue dans GNU Pascal !



0
par contre mon fichier pascal n'est pas dans le meme répertoire que là où j'ai téléchargé fpc , jle dis au cas où..
0
j'ai pas installé fpc dans home mais dans tmp...
0
lami20j Messages postés 21331 Date d'inscription jeudi 4 novembre 2004 Statut Modérateur, Contributeur sécurité Dernière intervention 30 octobre 2019 3 567
8 févr. 2007 à 00:51
Il faut lire les messages quand tu installes

Par exemple :-))
Install prefix (/usr or /usr/local)  [/home/lami20j/fpc-2.0.4] :
je vois que tu as télécharger pour l'architecture 64

affiche le résultat de la commande
uname -a
0
 uname -a
Linux lns-bzn-.adsl.proxad.net 2.6.17-5mdv #1 SMP Wed Sep 13 14:32:31 EDT 2006 i686 AMD Athlon(tm) 64 Processor 3200+ GNU/Linux
0
lami20j Messages postés 21331 Date d'inscription jeudi 4 novembre 2004 Statut Modérateur, Contributeur sécurité Dernière intervention 30 octobre 2019 3 567
8 févr. 2007 à 00:57
ok, maintenant regarde bien mon message 10 et fait la même chose chez toi
tu dois remplacer lami20j avec celia
0
non je t'ai dit que j'avais téléchargé et installé le fichier dans tmp , pas dans home , mais je fais ce que tu dis regarde :

[celia@lns-bzn-53-82-65-53-189 ~]$ ls -l
total 34
drwx------ 3  1024 fév  7 22:56 Desktop/
drwxrwxr-x 2  1024 fév  7 21:35 Documents/
-rw-rw-r-- 1 26145 fév  7 23:37 Firefox_wallpaper.png
drwxrwxr-x 2   1024 fév  3 03:15 Images/
drwxrwxr-x 2  1024 fév  3 03:15 Musique/
drwxrwxr-x 2  1024 fév  3 03:15 Téléchargement/
drwx------ 6  1024 fév  7 23:38 tmp/
drwxrwxr-x 2   1024 fév  3 03:15 Vidéo/
[celia@lns-bzn-53-82-65-53-189 ~]$ cd fpc-2.0.4
bash: cd: fpc-2.0.4: Aucun fichier ou répertoire de ce type
[celia@lns-bzn-53-82-65-53-189 ~]$      


et je rajoute çà :

$ whereis fpc
fpc: /etc/fpc.cfg
0
par contre quand je fais cd tmp j'ai :

[celia@lns-bzn-53-82-65-53-189 ~]$ cd tmp
[celia@lns-bzn-53-82-65-53-189 tmp]$ ls
binary.x86_64-linux.tar  fpc-2.0.4.x86_64-linux.tar  ksocket-celia/  y/
demo.tar.gz              install.sh*                 mapping-celia=
doc-pdf.tar.gz           kde-celia/                 orbit-celia/
0
lami20j Messages postés 21331 Date d'inscription jeudi 4 novembre 2004 Statut Modérateur, Contributeur sécurité Dernière intervention 30 octobre 2019 3 567
8 févr. 2007 à 01:07
tape en root
find / -name '*fpc*'
et affiche le résultat
0
j'ai posté un message qui peut t'intéressé juste avant ;)
0
lami20j Messages postés 21331 Date d'inscription jeudi 4 novembre 2004 Statut Modérateur, Contributeur sécurité Dernière intervention 30 octobre 2019 3 567
8 févr. 2007 à 01:11
non, ça ne m'interesse pas, affiche le résultat de la commande en root
find / -name '*fpc*'
0