pam_mysql-0.5.tar.gz怎么make生不成pam_mysql.so??请教!

发布于 2022-10-03 01:18:26 字数 187 浏览 18 评论 0

我的系统是redhatlinux9,mysql-3.23.57,我安装好数据库后,解压pam_mysql-0.5.tar.gz,然后,make,但是没有我需要的pam_mysql.so,而是pam_mysql.c。

请教这个是怎么回事,我看说明里说只要先装好数据库就可以安装这个了呀??

谢谢!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(9

耳钉梦 2022-10-10 01:18:26

我的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

渡你暖光 2022-10-10 01:18:26

我把:
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,还是不行!

高手们,要帮帮偶啦

两仪 2022-10-10 01:18:26

UP

冧九 2022-10-10 01:18:26

高手们都饭饭去了?

云裳 2022-10-10 01:18:26

UPUP

陪你到最终 2022-10-10 01:18:26

UPUP

爱已欠费 2022-10-10 01:18:26

UP

毅然前行 2022-10-10 01:18:26

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

凹づ凸ル 2022-10-10 01:18:26

感谢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   

是必须要先安装吗?

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文