pam_mysql-0.5.tar.gz怎么make生不成pam_mysql.so??请教!
我的系统是redhatlinux9,mysql-3.23.57,我安装好数据库后,解压pam_mysql-0.5.tar.gz,然后,make,但是没有我需要的pam_mysql.so,而是pam_mysql.c。
请教这个是怎么回事,我看说明里说只要先装好数据库就可以安装这个了呀??
谢谢!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(9)
我的MYSQL数据库的安装路径是:/opt/mysql/
不是默认的/usr/local/mysql
[root@yuyuyouderedhat pam_mysql]# make
mkdir -p ./dynamic
gcc -O2 -Dlinux -DLINUX_PAM -ansi -D_POSIX_SOURCE -Wall -Wwrite-strings -Wpointer-arith -Wcast-qual -Wcast-align -Wtraditional -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Winline -Wshadow -pedantic -fPIC -DPAM_DYNAMIC -c pam_mysql.c -o dynamic/pam_mysql.o
pam_mysql.c:35:25: mysql/mysql.h: ûÓÐÄǸöÎļþ»òĿ¼
pam_mysql.c:81: parse error before '*' token
pam_mysql.c:81: warning: type defaults to `int' in declaration of `mysql_auth'
pam_mysql.c:81: ISO C forbids data definition with no type or storage class
pam_mysql.c:141: parse error before '*' token
pam_mysql.c:141: warning: function declaration isn't a prototype
pam_mysql.c:143: parse error before '*' token
pam_mysql.c:144: warning: function declaration isn't a prototype
pam_mysql.c:151: parse error before '*' token
pam_mysql.c:151: warning: function declaration isn't a prototype
pam_mysql.c:391: parse error before '*' token
pam_mysql.c:391: warning: function declaration isn't a prototype
pam_mysql.c: In function `db_connect':
pam_mysql.c:401: warning: implicit declaration of function `mysql_init'
pam_mysql.c:401: `auth_sql_server' undeclared (first use in this function)
pam_mysql.c:401: (Each undeclared identifier is reported only once
pam_mysql.c:401: for each function it appears in.)
pam_mysql.c:402: warning: implicit declaration of function `mysql_real_connect'
pam_mysql.c:404: warning: assignment makes pointer from integer without a cast
pam_mysql.c:407: warning: implicit declaration of function `mysql_select_db'
pam_mysql.c:411: warning: implicit declaration of function `mysql_error'
pam_mysql.c:411: warning: format argument is not a pointer (arg 3)
pam_mysql.c: In function `db_close':
pam_mysql.c:424: warning: implicit declaration of function `mysql_close'
pam_mysql.c: At top level:
pam_mysql.c:428: parse error before '*' token
pam_mysql.c:429: warning: function declaration isn't a prototype
pam_mysql.c: In function `db_checkpasswd':
pam_mysql.c:438: `MYSQL_RES' undeclared (first use in this function)
pam_mysql.c:438: `result' undeclared (first use in this function)
pam_mysql.c:439: `MYSQL_ROW' undeclared (first use in this function)
pam_mysql.c:439: parse error before "row"
pam_mysql.c:452: `user' undeclared (first use in this function)
pam_mysql.c:462: warning: implicit declaration of function `mysql_escape_string'
pam_mysql.c:509: warning: implicit declaration of function `mysql_query'
pam_mysql.c:509: `auth_sql_server' undeclared (first use in this function)
pam_mysql.c:513: warning: implicit declaration of function `mysql_store_result'
pam_mysql.c:516: warning: function `mysql_error' was previously declared within a block
pam_mysql.c:516: warning: format argument is not a pointer (arg 3)
pam_mysql.c:517: warning: implicit declaration of function `mysql_free_result'
pam_mysql.c:521: warning: implicit declaration of function `mysql_num_rows'
pam_mysql.c:523: warning: function `mysql_free_result' was previously declared within a block
pam_mysql.c:528: `row' undeclared (first use in this function)
pam_mysql.c:528: warning: implicit declaration of function `mysql_fetch_row'
pam_mysql.c:531: warning: function `mysql_error' was previously declared within a block
pam_mysql.c:531: warning: format argument is not a pointer (arg 3)
pam_mysql.c:536: `passwd' undeclared (first use in this function)
pam_mysql.c:576: warning: implicit declaration of function `make_scrambled_password'
pam_mysql.c:603: warning: function `mysql_free_result' was previously declared within a block
pam_mysql.c: At top level:
pam_mysql.c:673: parse error before '*' token
pam_mysql.c:675: warning: function declaration isn't a prototype
pam_mysql.c: In function `updatePasswd':
pam_mysql.c:690: `user' undeclared (first use in this function)
pam_mysql.c:690: `newpass' undeclared (first use in this function)
pam_mysql.c:692: `oldpass' undeclared (first use in this function)
pam_mysql.c:692: `isRoot' undeclared (first use in this function)
pam_mysql.c:732: warning: function `make_scrambled_password' was previously declared within a block
pam_mysql.c:768: warning: function `mysql_escape_string' was previously declared within a block
pam_mysql.c:786: warning: function `mysql_query' was previously declared within a block
pam_mysql.c:786: `my' undeclared (first use in this function)
pam_mysql.c:789: warning: function `mysql_error' was previously declared within a block
pam_mysql.c:789: warning: format argument is not a pointer (arg 3)
pam_mysql.c: At top level:
pam_mysql.c:839: parse error before '*' token
pam_mysql.c:839: warning: function declaration isn't a prototype
pam_mysql.c: In function `sqlLog':
pam_mysql.c:886: `user' undeclared (first use in this function)
pam_mysql.c:893: `msg' undeclared (first use in this function)
pam_mysql.c:906: warning: function `mysql_escape_string' was previously declared within a block
pam_mysql.c:952: warning: implicit declaration of function `mysql_real_query'
pam_mysql.c:952: `auth_sql_server' undeclared (first use in this function)
pam_mysql.c:963: warning: function `mysql_error' was previously declared within a block
pam_mysql.c:963: warning: format argument is not a pointer (arg 3)
pam_mysql.c: In function `pam_sm_authenticate':
pam_mysql.c:989: `MYSQL' undeclared (first use in this function)
pam_mysql.c:989: parse error before "auth_sql_server"
pam_mysql.c:1019: `auth_sql_server' undeclared (first use in this function)
pam_mysql.c: In function `pam_sm_chauthtok':
pam_mysql.c:1077: `MYSQL' undeclared (first use in this function)
pam_mysql.c:1077: parse error before "auth_sql_server"
pam_mysql.c:1100: `auth_sql_server' undeclared (first use in this function)
make: *** [dynamic/pam_mysql.o] Error 1
[root@yuyuyouderedhat pam_mysql]# ls
Changelog CREDITS dynamic Makefile Makefile.bsd pam_mysql.c Readme
请问这个需要不需要修改Makefile的参数,好象这里有个:
[root@yuyuyouderedhat pam_mysql]# vi Makefile
# Convenient defaults for compiling independently of the full source
# tree.
ifndef FULL_LINUX_PAM_SOURCE_TREE
export DYNAMIC=-DPAM_DYNAMIC
export CC=gcc
export CFLAGS=-O2 -Dlinux -DLINUX_PAM \
-ansi -D_POSIX_SOURCE -Wall -Wwrite-strings \
-Wpointer-arith -Wcast-qual -Wcast-align -Wtraditional \
-Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Winline \
-Wshadow -pedantic -fPIC
export MKDIR=mkdir -p
export LD_D=gcc -shared -Xlinker -x -L/usr/lib/mysql -lz
endif
#
#
TITLE=pam_mysql
我把:
export LD_D=gcc -shared -Xlinker -x -L/usr/lib/mysql -lz
修改为:
export LD_D=gcc -shared -Xlinker -x -L/opt/mysql/lib/mysql -lz
再make,还是不行!
高手们,要帮帮偶啦
UP
高手们都饭饭去了?
UPUP
UPUP
UP
mysql源包含devel包,需加安装开发包
加:修改makefile
Makefile如下
ifndef FULL_LINUX_PAM_SOURCE_TREE
export DYNAMIC=-DPAM_DYNAMIC
export CC=gcc
export CFLAGS=-O2 -Dlinux -DLINUX_PAM \
-ansi -D_POSIX_SOURCE -Wall -Wwrite-strings \
-Wpointer-arith -Wcast-qual -Wcast-align -Wtraditional \
-Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Winline \
-Wshadow -pedantic -fPIC -I/usr/local/mysql/include #此处修改成mysql的include位置
export MKDIR=mkdir -p
export LD_D=gcc -shared -Xlinker -x -L/usr/local/mysql/lib/mysql -lz #lib位置(需加devel包)
endif
感谢wingger!
这个是我修改后的Makefile:
# Convenient defaults for compiling independently of the full source
# tree.
ifndef FULL_LINUX_PAM_SOURCE_TREE
export DYNAMIC=-DPAM_DYNAMIC
export CC=gcc
export CFLAGS=-O2 -Dlinux -DLINUX_PAM \
-ansi -D_POSIX_SOURCE -Wall -Wwrite-strings \
-Wpointer-arith -Wcast-qual -Wcast-align -Wtraditional \
-Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Winline \
-Wshadow -pedantic -fPIC -I/opt/mysql/include
export MKDIR=mkdir -p
export LD_D=gcc -shared -Xlinker -x -L/opt/mysql/lib/mysql -lz
endif
但是你这句我没懂:
export LD_D=gcc -shared -Xlinker -x -L/usr/local/mysql/lib/mysql -lz #lib位置(需加devel包)
这个devel包是什么东东呢?
是这个软件吗?
MySQL-devel-3.23.57-1.i386.rpm
是必须要先安装吗?