off_t undefined
来源:互联网 发布:mpacc研究生生活知乎 编辑:程序博客网 时间:2024/05/24 01:24
今天帮朋友搭建lnmp环境的时候,在编译php-5.6.30的时候,报以下这个错误
configure: off_t undefined; check your library configuration
备注:linux 的操作系统是centos6.8(2.6.32-642.13.1.el6.x86_64)
lnmp环境搭建可以参考我的博文:http://blog.csdn.net/m0_37886429/article/details/68941918
刚开始php的编译参数是:
./configure --prefix=/usr/local/php \--with-config-file-path=/usr/local/php/etc \--enable-fpm \--with-fpm-user=www \--with-fpm-group=www \--with-mysql=/usr/local/mysql \--with-mysqli=/usr/local/mysql/bin/mysql_config \--with-mysql-sock=/usr/local/mysql/mysql.sock \--with-pdo-mysql=/usr/local/mysql \--with-iconv-dir \--with-freetype-dir \--with-jpeg-dir \--with-png-dir \--with-zlib \--with-libxml-dir=/usr \--enable-xml \--disable-rpath \--enable-bcmath \--enable-shmop \--enable-sysvsem \--enable-inline-optimization \--with-curl \--enable-mbregex \--enable-mbstring \--with-mcrypt \--enable-ftp \--with-gd \--enable-gd-native-ttf \--with-openssl \--with-mhash \--enable-pcntl \--enable-sockets \--with-xmlrpc \--enable-zip \--enable-soap \--with-gettext --disable-fileinfo \--enable-opcache=no \--enable-intl \--with-xsl
后来我将编译参数改为:
./configure --prefix=/usr/local/php \--with-config-file-path=/usr/local/php/etc \--enable-fpm \--with-fpm-user=www \--with-fpm-group=www \--disable-debug \--with-curl \--with-iconv \--with-pcre-regex \--with-zlib \--enable-bcmath \--enable-ftp \--enable-sockets \--enable-mbstring \--enable-mbregex \--with-gd \--with-jpeg-dir \--enable-soap \--with-mcrypt \--with-xsl \--enable-zip \--with-openssl \--enable-opcache=no \--with-mysqli=/usr/local/mysql/bin/mysql_config \--with-mysql-sock=/usr/local/mysql/mysql.sock \--with-pdo-mysql=/usr/local/mysql \--disable-fileinfo
后来报错就没有了,完美解决这个问题
备注:
1、在编译的时候加上 –disable-fileinfo这个参数是因为,假如内存不足1G的时候,会报以下错误
make: *** [ext/fileinfo/libmagic/apprentice.lo] Error 1
加上这个参数就可以避免了
2、我在网上也看一种方法来解决“off_t undefined”,但是最终多没有生效,例如:
echo '/usr/local/lib64/usr/local/lib/usr/lib/usr/lib64'>>/etc/ld.so.conf&&ldconfig -v
其实我感觉解决问题,还是需要我们多去尝试和突破
3、再用yum安装nginx,在启动过程中有一下错误:
Starting nginx: nginx: [emerg] socket() [::]:80 failed (97: Address family not supported by protocol) [FAILED]
这个问题,我在网上看了下,说是把这个参数“listen [::]:80 ipv6only=on default_server;”打开就可以了,具体我也没有尝试,因为我习惯用源码编译安装。
阅读全文
0 0
- off_t undefined
- off_t 问题
- 关于off_t的小短文
- C++文件操作指针移动-----off_t
- nginx 开发时 off_t 大小不一致问题
- 25 Linux下的off_t类型
- undefined
- undefined
- NDK error: 'off_t' does not name a type
- vim7.3编译报错error: cannot compute sizeof (off_t)解决方法
- 比较undefined和“undefined”
- undefined与"undefined"
- undefined reference
- IP_RECVDSTADDR undefined
- Undefined symbol
- Undefined index
- Undefined symbols
- “irq_to_desc” undefined?
- Chapter3.1.1 python函数小示例
- Google I O 2017 之Android开发特性
- urlconnection示例
- caffe GPU版本使用fcn分割自己的图像
- html img图片不变形等比例缩放,兼容ie6
- off_t undefined
- windowSoftInputMode属性详解
- 微信小程序横向左右滑动案例
- HTML+CSS要点总结
- 项目集成腾讯直播sdk遇到的bug
- CSS:样式、选择器、特性、格式化排版
- <Pycharm>快捷键总结 .
- Android 通用流行框架大全
- 线程池