아마 2.4와 2.6이 혼합되어 설치되어있고, 2.6이 정상설치가 되지 않은듯 싶다.
옵션에 따라서 이러한 오류가 발생했다.
# gcc py.c -I/usr/local/include/python2.6 -L/usr/local/lib/libpython2.6.a
/tmp/cc88iTD7.o: In function `main':
py.c:(.text+0x12): undefined reference to `Py_Initialize'
py.c:(.text+0x26): undefined reference to `PyRun_SimpleStringFlags'
py.c:(.text+0x2b): undefined reference to `Py_Finalize'
collect2: ld returned 1 exit status
# gcc py.c -I/usr/local/include/python2.6 -lpython2.6
/usr/local/lib/libpython2.6.a(posixmodule.o): In function
`posix_tmpnam':
./Modules/posixmodule.c:7180: warning: the use of `tmpnam_r' is
dangerous, better use `mkstemp'
/usr/local/lib/libpython2.6.a(posixmodule.o): In function
`posix_tempnam':
./Modules/posixmodule.c:7135: warning: the use of `tempnam' is
dangerous, better use `mkstemp'
/usr/local/lib/libpython2.6.a(signalmodule.o): In function
`timeval_from_double':
./Modules/signalmodule.c:106: undefined reference to `floor'
./Modules/signalmodule.c:107: undefined reference to `fmod'
./Modules/signalmodule.c:106: undefined reference to `floor'
./Modules/signalmodule.c:107: undefined reference to `fmod'
/usr/local/lib/libpython2.6.a(floatobject.o): In function `float_pow':
Objects/floatobject.c:972: undefined reference to `pow'
/usr/local/lib/libpython2.6.a(floatobject.o): In function
`float_divmod':
Objects/floatobject.c:856: undefined reference to `fmod'
/usr/local/lib/libpython2.6.a(floatobject.o): In function `float_rem':
Objects/floatobject.c:834: undefined reference to `fmod'
/usr/local/lib/libpython2.6.a(longobject.o): In function
`PyLong_FromString':
Objects/longobject.c:1610: undefined reference to `log'
Objects/longobject.c:1610: undefined reference to `log'
/usr/local/lib/libpython2.6.a(dynload_shlib.o): In function
`_PyImport_GetDynLoadFunc':
Python/dynload_shlib.c:94: undefined reference to `dlsym'
Python/dynload_shlib.c:130: undefined reference to `dlopen'
Python/dynload_shlib.c:141: undefined reference to `dlsym'
Python/dynload_shlib.c:133: undefined reference to `dlerror'
/usr/local/lib/libpython2.6.a(thread.o): In function
`_pythread_pthread_set_stacksize':
Python/thread_pthread.h:519: undefined reference to
`pthread_attr_setstacksize'
/usr/local/lib/libpython2.6.a(thread.o): In function
`PyThread_release_lock':
Python/thread_pthread.h:374: undefined reference to `sem_post'
/usr/local/lib/libpython2.6.a(thread.o): In function
`PyThread_free_lock':
Python/thread_pthread.h:320: undefined reference to `sem_destroy'
/usr/local/lib/libpython2.6.a(thread.o): In function
`PyThread_allocate_lock':
Python/thread_pthread.h:296: undefined reference to `sem_init'
/usr/local/lib/libpython2.6.a(thread.o): In function
`PyThread_acquire_lock':
Python/thread_pthread.h:351: undefined reference to `sem_trywait'
Python/thread_pthread.h:349: undefined reference to `sem_wait'
/usr/local/lib/libpython2.6.a(thread.o): In function
`PyThread_start_new_thread':
Python/thread_pthread.h:171: undefined reference to
`pthread_attr_setstacksize'
Python/thread_pthread.h:181: undefined reference to `pthread_create'
Python/thread_pthread.h:197: undefined reference to `pthread_detach'
/usr/local/lib/libpython2.6.a(thread.o): In function
`PyThread_release_lock':
Python/thread_pthread.h:374: undefined reference to `sem_post'
Python/thread_pthread.h:374: undefined reference to `sem_post'
Python/thread_pthread.h:374: undefined reference to `sem_post'
/usr/local/lib/libpython2.6.a(thread.o): In function
`PyThread_allocate_lock':
Python/thread_pthread.h:296: undefined reference to `sem_init'
Python/thread_pthread.h:296: undefined reference to `sem_init'
/usr/local/lib/libpython2.6.a(posixmodule.o): In function
`posix_forkpty':
posixmodule.c:(.text+0x2653): undefined reference to `forkpty'
/usr/local/lib/libpython2.6.a(posixmodule.o): In function
`posix_openpty':
posixmodule.c:(.text+0x26fc): undefined reference to `openpty'
/usr/local/lib/libpython2.6.a(complexobject.o): In function `_Py_c_abs':
Objects/complexobject.c:214: undefined reference to `hypot'
/usr/local/lib/libpython2.6.a(complexobject.o): In function `_Py_c_pow':
Objects/complexobject.c:143: undefined reference to `hypot'
Objects/complexobject.c:144: undefined reference to `pow'
Objects/complexobject.c:145: undefined reference to `atan2'
Objects/complexobject.c:151: undefined reference to `cos'
Objects/complexobject.c:152: undefined reference to `sin'
Objects/complexobject.c:148: undefined reference to `exp'
Objects/complexobject.c:149: undefined reference to `log'
collect2: ld returned 1 exit status