免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 3167 | 回复: 9
打印 上一主题 下一主题

编译pam_mysql失败 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2005-04-08 12:54 |只看该作者 |倒序浏览
各位大侠帮我看看啊
我的系统用的是RedHat9.0,
mysql是用mysql-standard-5.0.0-alpha-pc-linux-i686.tar.gz这个包装的
但编译Pam_Mysql Version 0.4.5时
出现了
make: *** [dynamic/pam_mysql.o] Error 1
这个错误

To try this, you need PAM to already be installed and working and have a MySQL server up and running as well. I typically copy the pam_mysql.so to /lib/security and make the proper changes to /etc/pam.d/ and /etc/pam.conf
上面的是pam_mysql里带的Readme的内容,编译时我启动了mysql,pam包是系统自带的pam-0.75-48  
先谢谢各位了!!

论坛徽章:
0
2 [报告]
发表于 2005-04-08 12:56 |只看该作者

编译pam_mysql失败

这是编译出现的全部信息
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:20:25: mysql/mysql.h: No such file or directory
pam_mysql.c:38:34: security/pam_modules.h: No such file or directory
pam_mysql.c:39:31: security/pam_misc.h: No such file or directory
pam_mysql.c:55: parse error before '*' token
pam_mysql.c:55: warning: type defaults to `int' in declaration of `mysql_auth'
pam_mysql.c:55: ISO C forbids data definition with no type or storage class
pam_mysql.c:71: parse error before '*' token
pam_mysql.c:74: warning: function declaration isn't a prototype
pam_mysql.c:76: parse error before '*' token
pam_mysql.c:78: warning: function declaration isn't a prototype
pam_mysql.c:80: parse error before '*' token
pam_mysql.c:80: warning: function declaration isn't a prototype
pam_mysql.c:82: parse error before '*' token
pam_mysql.c:82: warning: function declaration isn't a prototype
pam_mysql.c: In function `db_close':
pam_mysql.c:90: warning: implicit declaration of function `mysql_close'
pam_mysql.c: At top level:
pam_mysql.c:95: parse error before '*' token
pam_mysql.c:96: warning: function declaration isn't a prototype
pam_mysql.c: In function `db_connect':
pam_mysql.c:97: `PAM_AUTH_ERR' undeclared (first use in this function)
pam_mysql.c:97: (Each undeclared identifier is reported only once
pam_mysql.c:97: for each function it appears in.)
pam_mysql.c:103: `PAM_SUCCESS' undeclared (first use in this function)
pam_mysql.c:104: warning: implicit declaration of function `mysql_init'
pam_mysql.c:104: `auth_sql_server' undeclared (first use in this function)
pam_mysql.c:105: warning: implicit declaration of function `mysql_real_connect'
pam_mysql.c:109: warning: assignment makes pointer from integer without a cast
pam_mysql.c:112: warning: implicit declaration of function `mysql_select_db'
pam_mysql.c:118: warning: implicit declaration of function `mysql_error'
pam_mysql.c:118: warning: format argument is not a pointer (arg 3)
pam_mysql.c: At top level:
pam_mysql.c:126: parse error before '*' token
pam_mysql.c:127: warning: function declaration isn't a prototype
pam_mysql.c: In function `db_checkpasswd':
pam_mysql.c:134: `MYSQL_RES' undeclared (first use in this function)
pam_mysql.c:134: `result' undeclared (first use in this function)
pam_mysql.c:135: `PAM_AUTH_ERR' undeclared (first use in this function)
pam_mysql.c:135: warning: ISO C89 forbids mixed declarations and code
pam_mysql.c:140: `user' undeclared (first use in this function)
pam_mysql.c:142: `PAM_BUF_ERR' undeclared (first use in this function)
pam_mysql.c:154: `passwd' undeclared (first use in this function)
pam_mysql.c:165: warning: implicit declaration of function `mysql_escape_string'
pam_mysql.c:209: warning: implicit declaration of function `mysql_query'
pam_mysql.c:209: `auth_sql_server' undeclared (first use in this function)
pam_mysql.c:211: warning: implicit declaration of function `mysql_store_result'
pam_mysql.c:213: warning: function `mysql_error' was previously declared within a block
pam_mysql.c:213: warning: passing arg 2 of `syslog' makes pointer from integer without a cast
pam_mysql.c:223: warning: implicit declaration of function `mysql_num_rows'
pam_mysql.c:224: `PAM_SUCCESS' undeclared (first use in this function)
pam_mysql.c: At top level:
pam_mysql.c:236: parse error before '*' token
pam_mysql.c:239: warning: function declaration isn't a prototype
pam_mysql.c: In function `converse':
pam_mysql.c:243: warning: implicit declaration of function `pam_get_item'
pam_mysql.c:243: `pamh' undeclared (first use in this function)
pam_mysql.c:243: `PAM_CONV' undeclared (first use in this function)
pam_mysql.c:244: `PAM_SUCCESS' undeclared (first use in this function)
pam_mysql.c:246: dereferencing pointer to incomplete type
pam_mysql.c:246: `nargs' undeclared (first use in this function)
pam_mysql.c:247: `message' undeclared (first use in this function)
pam_mysql.c:247: `response' undeclared (first use in this function)
pam_mysql.c:247: dereferencing pointer to incomplete type
pam_mysql.c:248: `PAM_CONV_AGAIN' undeclared (first use in this function)
pam_mysql.c:251: warning: implicit declaration of function `pam_strerror'
pam_mysql.c:251: warning: format argument is not a pointer (arg 3)
pam_mysql.c:257: warning: function `pam_strerror' was previously declared within a block
pam_mysql.c:257: warning: format argument is not a pointer (arg 3)
pam_mysql.c: At top level:
pam_mysql.c:262: parse error before '*' token
pam_mysql.c:263: warning: function declaration isn't a prototype
pam_mysql.c: In function `askForPassword':
pam_mysql.c:264: warning: array type has incomplete element type
pam_mysql.c:264: storage size of `msg' isn't known
pam_mysql.c:274: `PAM_BUF_ERR' undeclared (first use in this function)
pam_mysql.c:281: `PAM_PROMPT_ECHO_OFF' undeclared (first use in this function)
pam_mysql.c:284: `pamh' undeclared (first use in this function)
pam_mysql.c:287: warning: implicit declaration of function `_pam_overwrite'
pam_mysql.c:288: warning: implicit declaration of function `_pam_drop'
pam_mysql.c:290: `PAM_SUCCESS' undeclared (first use in this function)
pam_mysql.c:293: warning: implicit declaration of function `_pam_drop_reply'
pam_mysql.c:294: `PAM_CONV_AGAIN' undeclared (first use in this function)
pam_mysql.c:295: `PAM_INCOMPLETE' undeclared (first use in this function)
pam_mysql.c:295: `PAM_AUTHINFO_UNAVAIL' undeclared (first use in this function)
pam_mysql.c:300: warning: implicit declaration of function `pam_set_item'
pam_mysql.c:300: `PAM_AUTHTOK' undeclared (first use in this function)
pam_mysql.c:300: dereferencing pointer to incomplete type
pam_mysql.c:264: warning: unused variable `msg'
pam_mysql.c: At top level:
pam_mysql.c:306: syntax error before "int"
pam_mysql.c:306: parse error before '*' token
pam_mysql.c:310: warning: function declaration isn't a prototype
pam_mysql.c: In function `pam_sm_authenticate':
pam_mysql.c:314: `MYSQL' undeclared (first use in this function)
pam_mysql.c:314: parse error before "auth_sql_server"
pam_mysql.c:321: `argc' undeclared (first use in this function)
pam_mysql.c:326: `argv' undeclared (first use in this function)
pam_mysql.c:340: warning: implicit declaration of function `D'
pam_mysql.c:348: warning: function `D' was previously declared within a block
pam_mysql.c:354: warning: function `D' was previously declared within a block
pam_mysql.c:357: warning: function `D' was previously declared within a block
pam_mysql.c:360: warning: function `D' was previously declared within a block
pam_mysql.c:363: warning: function `D' was previously declared within a block
pam_mysql.c:366: warning: function `D' was previously declared within a block
pam_mysql.c:369: warning: function `D' was previously declared within a block
pam_mysql.c:403: warning: implicit declaration of function `pam_get_user'
pam_mysql.c:403: `pamh' undeclared (first use in this function)
pam_mysql.c:404: `PAM_SUCCESS' undeclared (first use in this function)
pam_mysql.c:409: `PAM_USER_UNKNOWN' undeclared (first use in this function)
pam_mysql.c:412: warning: function `pam_get_item' was previously declared within a block
pam_mysql.c:412: `PAM_AUTHTOK' undeclared (first use in this function)
pam_mysql.c:420: `PAM_AUTHINFO_UNAVAIL' undeclared (first use in this function)
pam_mysql.c:422: `auth_sql_server' undeclared (first use in this function)
pam_mysql.c:424: warning: function `D' was previously declared within a block
pam_mysql.c:424: warning: left-hand operand of comma expression has no effect
pam_mysql.c:428: warning: function `D' was previously declared within a block
pam_mysql.c:428: warning: left-hand operand of comma expression has no effect
pam_mysql.c: At top level:
pam_mysql.c:442: syntax error before "int"
pam_mysql.c:442: parse error before '*' token
pam_mysql.c:444: warning: function declaration isn't a prototype
pam_mysql.c: In function `pam_sm_acct_mgmt':
pam_mysql.c:448: `PAM_SUCCESS' undeclared (first use in this function)
pam_mysql.c: At top level:
pam_mysql.c:452: syntax error before "int"
pam_mysql.c:452: parse error before '*' token
pam_mysql.c:454: warning: function declaration isn't a prototype
pam_mysql.c: In function `pam_sm_setcred':
pam_mysql.c:458: `PAM_SUCCESS' undeclared (first use in this function)
pam_mysql.c: At top level:
pam_mysql.c:464: syntax error before "int"
pam_mysql.c:464: parse error before '*' token
pam_mysql.c:466: warning: function declaration isn't a prototype
pam_mysql.c: In function `pam_sm_chauthtok':
pam_mysql.c:468: `PAM_SUCCESS' undeclared (first use in this function)
pam_mysql.c: At top level:
pam_mysql.c:474: syntax error before "int"
pam_mysql.c:474: parse error before '*' token
pam_mysql.c:476: warning: function declaration isn't a prototype
pam_mysql.c: In function `pam_sm_open_session':
pam_mysql.c:480: `PAM_SUCCESS' undeclared (first use in this function)
pam_mysql.c: At top level:
pam_mysql.c:484: syntax error before "int"
pam_mysql.c:484: parse error before '*' token
pam_mysql.c:486: warning: function declaration isn't a prototype
pam_mysql.c: In function `pam_sm_close_session':
pam_mysql.c:488: `PAM_SUCCESS' undeclared (first use in this function)
make: *** [dynamic/pam_mysql.o] Error 1

论坛徽章:
0
3 [报告]
发表于 2005-04-09 20:12 |只看该作者

编译pam_mysql失败

pam_mysql已经很久没有开发了,最新的版本好像还是2002年底的,怎么可能支持mysql5呢?

论坛徽章:
0
4 [报告]
发表于 2005-04-10 12:43 |只看该作者

编译pam_mysql失败

谁说不支持?
我以前下载过一个0.5版本的,支持的很好。

论坛徽章:
0
5 [报告]
发表于 2005-04-11 20:22 |只看该作者

编译pam_mysql失败

谢谢楼上两位的回复,你们觉得我编译不成功的原因是什么呢?
敬请指教!!!!!

论坛徽章:
0
6 [报告]
发表于 2005-04-12 13:23 |只看该作者

编译pam_mysql失败

我想是mysql版本太高了,pam_mysql版本太低导致

论坛徽章:
0
7 [报告]
发表于 2005-04-16 16:45 |只看该作者

编译pam_mysql失败

应该不会吧,我用mysql-server-3.23.54a-11.i386.rpm这个包装的mysql也不能是pam_mysql通过编译,还是出一样的问题!
谢谢!

论坛徽章:
0
8 [报告]
发表于 2005-06-30 08:42 |只看该作者

编译pam_mysql失败

小弟也遇到过这个问题。后来装了一个Linux-PAM二进制包,虽说编译时还是出错,但还是生成了pam_mysql.o文件,在安装目录的dynamic子目录下

论坛徽章:
0
9 [报告]
发表于 2005-06-30 11:01 |只看该作者

编译pam_mysql失败


  1. pam_mysql.c:20:25: mysql/mysql.h: No such file or directory
复制代码

懂了吧,没找到mysql的头文件,你可能需要手工指定一下

论坛徽章:
0
10 [报告]
发表于 2007-12-05 10:17 |只看该作者
安装 mysql-devel 开发套件就ok了~!
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP