Jeg hadde ogs? dette problemet, som er nevnt under
kef@it.hin.no 18.05.2004 22:01:08 >>>
Etter en reboot, skjer f?lgende:
[root@Nav3 root]# /usr/local/nav/bin/nav start Traceback (most recent call last): File "/usr/local/nav/bin/nav", line 54, in ? from nav.startstop import * ImportError: No module named nav.startstop
Dette skyldes at Python ikke vet hvor den skal finne NAV-bibliotekene. Beklageligvis ser det ut til at scriptet du skal ha lagt inn i /etc/profile.d/ ikke blir kj?rt n?r man logger inn som root. Dette scriptet skal nemlig ta seg av ? sette opp milj?variabler riktig for en typisk NAV-installasjon. Forel?pig kan du source inn denne helt eksplisitt i root sin ~/.bashrc - s? b?r du v?re sikker p? at det blir satt riktig.
N?r jeg startet p? nytt etter at jeg la inn milj?variablene, fikk jeg disse feilmeldingene
[root@nav3 root]# /usr/local/nav/bin/nav start no crontab for navcron Traceback (most recent call last): File "/usr/local/nav/bin/nav", line 57, in ? services = ServiceRegistry() File "/usr/local/nav/lib/python/nav/startstop.py", line 335, in __init__ serviceList.extend(serviceType.loadServices()) File "/usr/local/nav/lib/python/nav/startstop.py", line 154, in loadServices serviceList = [cls(f) for f in fileList] File "/usr/local/nav/lib/python/nav/startstop.py", line 136, in __init__ CronService.crontab = Crontab(CronService.cronUser) File "/usr/local/nav/lib/python/nav/startstop.py", line 211, in __init__ self.load() File "/usr/local/nav/lib/python/nav/startstop.py", line 221, in load if self.content[0][:2] == '# ': del self.content[0] IndexError: list index out of range [root@nav3 root]#
Jeg antar at det er noe tull med mod_python. Jeg fant kun mod_python-2.7.10, men h?per det g?r greitt.
Jeg pr?vde ogs? ? redigere Makefile og legge til LIBS="-lm -lutil men da ble det slik
make LIBS="-lm -lutil /usr/src/redhat/BUILD/Python-2.2.2/libpython2.2.a" OPT=-DEAPI make[1]: Entering directory `/root/nav3filer/mod_python-2.7.10/src' gcc -DEAPI -I/root/nav3filer/mod_python-2.7.10/src/include -I/usr/include/httpd -I/usr/src/redhat/BUILD/Python-2.2.2 -I/usr/src/redhat/BUILD/Python-2.2.2/Include -c -o mod_python.o mod_python.c In file included from mod_python.c:54: /root/nav3filer/mod_python-2.7.10/src/include/mod_python.h:93: parse error before '*' token /root/nav3filer/mod_python-2.7.10/src/include/mod_python.h:93: warning: data definition has no type or storage class /root/nav3filer/mod_python-2.7.10/src/include/mod_python.h:96: parse error before "python_module" /root/nav3filer/mod_python-2.7.10/src/include/mod_python.h:96: warning: data definition has no type or storage class In file included from /root/nav3filer/mod_python-2.7.10/src/include/mod_python.h:99, from mod_python.c:54: /root/nav3filer/mod_python-2.7.10/src/include/util.h:57: parse error before '*' token In file included from /root/nav3filer/mod_python-2.7.10/src/include/mod_python.h:100, from mod_python.c:54: /root/nav3filer/mod_python-2.7.10/src/include/tableobject.h:69: parse error before "table" /root/nav3filer/mod_python-2.7.10/src/include/tableobject.h:69: warning: no semicolon at end of struct or union /root/nav3filer/mod_python-2.7.10/src/include/tableobject.h:70: warning: data definition has no type or storage class /root/nav3filer/mod_python-2.7.10/src/include/tableobject.h:71: parse error before '}' token /root/nav3filer/mod_python-2.7.10/src/include/tableobject.h:71: warning: data definition has no type or storage class /root/nav3filer/mod_python-2.7.10/src/include/tableobject.h:77: parse error before '*' token In file included from mod_python.c:54: /root/nav3filer/mod_python-2.7.10/src/include/mod_python.h:139: parse error before "table" /root/nav3filer/mod_python-2.7.10/src/include/mod_python.h:139: warning: no semicolon at end of struct or union /root/nav3filer/mod_python-2.7.10/src/include/mod_python.h:140: warning: data definition has no type or storage class /root/nav3filer/mod_python-2.7.10/src/include/mod_python.h:141: parse error before '*' token /root/nav3filer/mod_python-2.7.10/src/include/mod_python.h:141: warning: data definition has no type or storage class /root/nav3filer/mod_python-2.7.10/src/include/mod_python.h:142: parse error before '}' token /root/nav3filer/mod_python-2.7.10/src/include/mod_python.h:142: warning: data definition has no type or storage class mod_python.c:61: parse error before '*' token mod_python.c:61: warning: data definition has no type or storage class mod_python.c:63: parse error before '*' token mod_python.c:63: warning: data definition has no type or storage class mod_python.c: In function `make_interpreter': mod_python.c:83: warning: passing arg 4 of `ap_log_error' makes integer from pointer without a cast mod_python.c:83: warning: passing arg 5 of `ap_log_error' from incompatible pointer type mod_python.c:83: too few arguments to function `ap_log_error' mod_python.c: In function `python_cleanup': mod_python.c:173: warning: passing arg 4 of `ap_log_rerror' makes integer from pointer without a cast mod_python.c:173: warning: passing arg 5 of `ap_log_rerror' from incompatible pointer type mod_python.c:173: too few arguments to function `ap_log_rerror' mod_python.c:176: warning: passing arg 4 of `ap_log_error' makes integer from pointer without a cast mod_python.c:176: warning: passing arg 5 of `ap_log_error' from incompatible pointer type mod_python.c:176: too few arguments to function `ap_log_error' mod_python.c:214: warning: passing arg 4 of `ap_log_rerror' makes integer from pointer without a cast mod_python.c:214: warning: passing arg 5 of `ap_log_rerror' from incompatible pointer type mod_python.c:217: warning: passing arg 4 of `ap_log_rerror' makes integer from pointer without a cast mod_python.c:217: warning: passing arg 5 of `ap_log_rerror' from incompatible pointer type mod_python.c:222: warning: passing arg 4 of `ap_log_error' makes integer from pointer without a cast mod_python.c:222: warning: passing arg 5 of `ap_log_error' from incompatible pointer type mod_python.c:225: warning: passing arg 4 of `ap_log_error' makes integer from pointer without a cast mod_python.c:225: warning: passing arg 5 of `ap_log_error' from incompatible pointer type mod_python.c: At top level: mod_python.c:258: parse error before "pool" mod_python.c: In function `python_init': mod_python.c:265: invalid operands to binary * mod_python.c:268: warning: passing arg 1 of `ap_add_version_component' from incompatible pointer type mod_python.c:268: too few arguments to function `ap_add_version_component' mod_python.c:272: warning: passing arg 1 of `ap_add_version_component' from incompatible pointer type mod_python.c:272: too few arguments to function `ap_add_version_component' mod_python.c:292: `s' undeclared (first use in this function) mod_python.c:292: (Each undeclared identifier is reported only once mod_python.c:292: for each function it appears in.) mod_python.c:293: warning: passing arg 5 of `ap_log_error' from incompatible pointer type mod_python.c:293: too few arguments to function `ap_log_error' mod_python.c: At top level: mod_python.c:313: parse error before '*' token mod_python.c: In function `python_create_dir_config': mod_python.c:316: `conf' undeclared (first use in this function) mod_python.c:317: parse error before ')' token mod_python.c:321: `dir' undeclared (first use in this function) mod_python.c:322: `p' undeclared (first use in this function) mod_python.c: At top level: mod_python.c:339: parse error before '*' token mod_python.c: In function `mp_copy_table': mod_python.c:342: `array_header' undeclared (first use in this function) mod_python.c:342: `ah' undeclared (first use in this function) mod_python.c:343: `table_entry' undeclared (first use in this function) mod_python.c:343: `elts' undeclared (first use in this function) mod_python.c:346: `t2' undeclared (first use in this function) mod_python.c:347: parse error before ')' token mod_python.c:352: `t1' undeclared (first use in this function) mod_python.c: At top level: mod_python.c:360: parse error before '*' token mod_python.c: In function `python_merge_dir_config': mod_python.c:363: `merged_conf' undeclared (first use in this function) mod_python.c:363: parse error before ')' token mod_python.c:364: `current_conf' undeclared (first use in this function) mod_python.c:364: parse error before ')' token mod_python.c:365: `new_conf' undeclared (first use in this function) mod_python.c:365: parse error before ')' token mod_python.c:372: `p' undeclared (first use in this function) mod_python.c: In function `python_directive': mod_python.c:415: `conf' undeclared (first use in this function) mod_python.c:418: parse error before ')' token mod_python.c:429: warning: assignment makes pointer from integer without a cast mod_python.c:431: warning: assignment makes pointer from integer without a cast mod_python.c: In function `get_request_object': mod_python.c:502: request for member `module_index' in something not a structure or union mod_python.c:536: request for member `module_index' in something not a structure or union mod_python.c: In function `python_handler': mod_python.c:554: `conf' undeclared (first use in this function) mod_python.c:560: parse error before ')' token mod_python.c:560: request for member `module_index' in something not a structure or union mod_python.c:574: warning: assignment makes pointer from integer without a cast mod_python.c:579: warning: assignment makes pointer from integer without a cast mod_python.c:581: warning: passing arg 1 of `ap_is_directory' from incompatible pointer type mod_python.c:581: too few arguments to function `ap_is_directory' mod_python.c:584: warning: passing arg 2 of `ap_make_dirstr_parent' makes pointer from integer without a cast mod_python.c:604: warning: assignment makes pointer from integer without a cast mod_python.c:608: warning: assignment makes pointer from integer without a cast mod_python.c:612: warning: initialization makes pointer from integer without a cast mod_python.c:613: warning: assignment makes pointer from integer without a cast mod_python.c:642: warning: passing arg 4 of `ap_log_rerror' makes integer from pointer without a cast mod_python.c:642: warning: passing arg 5 of `ap_log_rerror' from incompatible pointer type mod_python.c:642: too few arguments to function `ap_log_rerror' mod_python.c:661: warning: passing arg 4 of `ap_log_rerror' makes integer from pointer without a cast mod_python.c:661: warning: passing arg 5 of `ap_log_rerror' from incompatible pointer type mod_python.c:661: too few arguments to function `ap_log_rerror' mod_python.c:688: warning: assignment makes pointer from integer without a cast mod_python.c:690: warning: assignment makes pointer from integer without a cast mod_python.c:692: warning: assignment makes pointer from integer without a cast mod_python.c:695: warning: assignment makes pointer from integer without a cast mod_python.c:697: warning: assignment makes pointer from integer without a cast mod_python.c:699: warning: assignment makes pointer from integer without a cast mod_python.c:702: warning: assignment makes pointer from integer without a cast mod_python.c:704: warning: assignment makes pointer from integer without a cast mod_python.c:730: warning: passing arg 4 of `ap_log_rerror' makes integer from pointer without a cast mod_python.c:730: warning: passing arg 5 of `ap_log_rerror' from incompatible pointer type mod_python.c:730: too few arguments to function `ap_log_rerror' mod_python.c:738: warning: passing arg 4 of `ap_log_rerror' makes integer from pointer without a cast mod_python.c:738: warning: passing arg 5 of `ap_log_rerror' from incompatible pointer type mod_python.c:738: too few arguments to function `ap_log_rerror' mod_python.c: In function `python_cleanup_handler': mod_python.c:816: `conf' undeclared (first use in this function) mod_python.c:821: parse error before ')' token mod_python.c:821: request for member `module_index' in something not a structure or union mod_python.c:832: warning: assignment makes pointer from integer without a cast mod_python.c:837: warning: assignment makes pointer from integer without a cast mod_python.c:839: warning: passing arg 1 of `ap_is_directory' from incompatible pointer type mod_python.c:839: too few arguments to function `ap_is_directory' mod_python.c:843: warning: passing arg 2 of `ap_make_dirstr_parent' makes pointer from integer without a cast mod_python.c:860: warning: assignment makes pointer from integer without a cast mod_python.c:888: warning: passing arg 4 of `ap_log_rerror' makes integer from pointer without a cast mod_python.c:888: warning: passing arg 5 of `ap_log_rerror' from incompatible pointer type mod_python.c:888: too few arguments to function `ap_log_rerror' mod_python.c:907: warning: passing arg 4 of `ap_log_rerror' makes integer from pointer without a cast mod_python.c:907: warning: passing arg 5 of `ap_log_rerror' from incompatible pointer type mod_python.c:907: too few arguments to function `ap_log_rerror' mod_python.c:933: warning: assignment makes pointer from integer without a cast mod_python.c:935: warning: assignment makes pointer from integer without a cast mod_python.c:937: warning: assignment makes pointer from integer without a cast mod_python.c:940: warning: assignment makes pointer from integer without a cast mod_python.c:943: warning: assignment makes pointer from integer without a cast mod_python.c: In function `directive_PythonImport': mod_python.c:990: `conf' undeclared (first use in this function) mod_python.c:994: parse error before ')' token mod_python.c:1002: warning: assignment makes pointer from integer without a cast mod_python.c:1015: warning: assignment makes pointer from integer without a cast mod_python.c: In function `directive_PythonInterpPerDirective': mod_python.c:1092: `conf' undeclared (first use in this function) mod_python.c:1095: parse error before ')' token mod_python.c: In function `directive_PythonInterpPerDirectory': mod_python.c:1125: `conf' undeclared (first use in this function) mod_python.c:1128: parse error before ')' token mod_python.c: In function `directive_PythonOption': mod_python.c:1187: `conf' undeclared (first use in this function) mod_python.c:1189: parse error before ')' token mod_python.c: At top level: mod_python.c:1311: parse error before "pool" mod_python.c: In function `PythonChildInitHandler': mod_python.c:1314: `array_header' undeclared (first use in this function) mod_python.c:1314: `ah' undeclared (first use in this function) mod_python.c:1315: `table_entry' undeclared (first use in this function) mod_python.c:1315: `elts' undeclared (first use in this function) mod_python.c:1327: `p' undeclared (first use in this function) mod_python.c:1327: `ap_null_cleanup' undeclared (first use in this function) mod_python.c:1341: parse error before ')' token mod_python.c:1354: `s' undeclared (first use in this function) mod_python.c:1362: warning: passing arg 5 of `ap_log_error' from incompatible pointer type mod_python.c:1362: too few arguments to function `ap_log_error' mod_python.c:1379: warning: passing arg 5 of `ap_log_error' from incompatible pointer type mod_python.c:1379: too few arguments to function `ap_log_error' mod_python.c:1412: warning: passing arg 5 of `ap_log_error' from incompatible pointer type mod_python.c: In function `PythonPostReadRequestHandler': mod_python.c:1459: `ap_null_cleanup' undeclared (first use in this function) mod_python.c: At top level: mod_python.c:1478: parse error before "python_handlers" mod_python.c:1480: warning: braces around scalar initializer mod_python.c:1480: warning: (near initialization for `python_handlers[0]') mod_python.c:1480: warning: initialization makes integer from pointer without a cast mod_python.c:1480: warning: excess elements in scalar initializer mod_python.c:1480: warning: (near initialization for `python_handlers[0]') mod_python.c:1481: warning: braces around scalar initializer mod_python.c:1481: warning: (near initialization for `python_handlers[1]') mod_python.c:1481: warning: initialization makes integer from pointer without a cast mod_python.c:1482: warning: data definition has no type or storage class mod_python.c:1683: conflicting types for `python_module' /root/nav3filer/mod_python-2.7.10/src/include/mod_python.h:96: previous declaration of `python_module' mod_python.c:1685: `this_module_needs_to_be_ported_to_apache_2_0' undeclared here (not in a function) mod_python.c:1685: initializer element is not constant mod_python.c:1685: (near initialization for `python_module.version') mod_python.c:1686: warning: initialization makes integer from pointer without a cast mod_python.c:1687: warning: initialization makes integer from pointer without a cast mod_python.c:1688: warning: initialization from incompatible pointer type mod_python.c:1691: warning: initialization makes integer from pointer without a cast mod_python.c:1692: warning: initialization from incompatible pointer type mod_python.c:1693: warning: initialization from incompatible pointer type mod_python.c:1694: warning: initialization from incompatible pointer type mod_python.c:1695: warning: initialization from incompatible pointer type mod_python.c:1696: warning: initialization from incompatible pointer type mod_python.c:1697: warning: initialization from incompatible pointer type mod_python.c:1698: warning: initialization from incompatible pointer type mod_python.c:1699: warning: excess elements in struct initializer mod_python.c:1699: warning: (near initialization for `python_module') mod_python.c:1700: warning: excess elements in struct initializer mod_python.c:1700: warning: (near initialization for `python_module') mod_python.c:1701: warning: excess elements in struct initializer mod_python.c:1701: warning: (near initialization for `python_module') mod_python.c:1702: warning: excess elements in struct initializer mod_python.c:1702: warning: (near initialization for `python_module') mod_python.c:1704: warning: excess elements in struct initializer mod_python.c:1704: warning: (near initialization for `python_module') make[1]: *** [mod_python.o] Error 1 make[1]: Leaving directory `/root/nav3filer/mod_python-2.7.10/src' make: *** [do_dso] Error 2
Peder Sefland