Assuming that you already have the OpenSSL libraries and header files (on rpm systems the latter are in the xxxx-devel package)...

The issue seems to arise from how configure resolves dependencies which are distributed around the filesystem. To compile the code, the comiler needs to know where the headers are. To link the code, the linker needs to know where the libraries are.

[colin@host]$ configure .... --with-openssl-dir=/usr/include/openssl ....
...
checking OpenSSL dir for FTP... /usr/include/openssl
checking for pkg-config... /usr/bin/pkg-config
configure: error: Cannot find OpenSSL's <evp.h> [colin@host]$ find /usr/include -name evp.h
/usr/include/openssl/evp.h

The include directory has the include file, but pkg-config fails because the library is not in /usr/include/openssl, its in /usr/lib

Running configure again with /usr as the directory:

configure .... --with-openssl-dir=/usr ....
...
checking OpenSSL dir for FTP... /usr
checking for pkg-config... /usr/bin/pkg-config
checking for OpenSSL version... >= 0.9.6
checking for CRYPTO_free in -lcrypto... yes
...

The path passed as an argument is searched to find the relevant resources.

--------------------------------------------------------------------------------------

第一步: 下载 PHP5.6.9

  wget http://hk1.php.net/get/php-5.6.9.tar.gz/from/this/mirror

第二步:

  mkdir /opt/PHP-5.6

  mkdir /opt/PHP-5.6/etc

第三步:

./configure     --enable-fpm     --with-mcrypt     --enable-mbstring       --with-mysql     --with-mysql-sock     --with-gd     --with-fpm-user=www-data    --with-fpm-group=www-data  --prefix=/opt/PHP-5.6  --with-config-file-path=/opt/PHP-5.6/etc

第四步:

  make

第五步:

  make install

ubuntu compile php from source code的更多相关文章

  1. compile vi from source code

    1.install ncurses library (vi  depend on ncurses library) ./configure --prefix=/usr --with-termlib m ...

  2. pug.compile() will compile the Pug source code into a JavaScript function that takes a data object (called “locals”) as an argument.

    Getting Started – Pug https://pugjs.org/api/getting-started.html GitHub - Tencent/wepy: 小程序组件化开发框架 h ...

  3. How to compile and install Snort from source code on Ubuntu

    http://www.tuicool.com/articles/v6j2Ab Snort is by far the most popular open-source network intrusio ...

  4. How to compile and install Linux Kernel 5.1.2 from source code

    How to compile and install Linux Kernel 5.1.2 from source code Compiling a custom kernel has its adv ...

  5. ubuntu下安装pandas出现 compile failed with error code 1 in /tmp/pip_build_hadoop/pandas

    都是用pip装的,是不是应该用apt-get 装的呀 ubuntu下安装pandas (出现 compile failed with error code 1 in /tmp/pip_build_ha ...

  6. How to Build MySQL from Source Code on Windows & compile MySQL on win7+vs2010

    Not counting obtaining the source code, and once you have the prerequisites satisfied, [Windows] use ...

  7. 在Ubuntu 中使用Source Code Pro字体

    1.下载字体 推荐GitHub上面的项目主页上下载 Source Code Pro 2.解压 unzip SourceCodePro_FontsOnly-1.013.zip 3. 打开SourceCo ...

  8. ubuntu 12.04 下 eclipse关联 source code

    一.JDK source code 命令行中: sudo apt-get install openjdk-7-source 下好的jdk源码在 Linux 在目录 usr/lib/jvm/openjd ...

  9. Indenting source code

    Artistic Style 1.15.3 A Free , Fast and Small Automatic Formatterfor C , C++ , C# , Java Source Code ...

随机推荐

  1. 离线功能对比:service worker和applicationCache

    SW 复杂,事件驱动,可以拦截请求,和缓存这些请求的响应数据,实现的效果更加灵活 AppCache 简单易用,声明式的将要缓存的文件清单声明在一个文件中.由于设计上的原因,它存在一些问题,导致难以运用 ...

  2. 【mysql】配置 选项文件

    在Windows中,MySQL程序从以下文件读取启动选项: 文件名 目的 WINDIR\my.ini 全局选项 C:\my.cnf 全局选项 INSTALLDIR\my.ini 全局选项 defaul ...

  3. LeetCode(102) Binary Tree Level Order Traversal

    题目 Given a binary tree, return the level order traversal of its nodes' values. (ie, from left to rig ...

  4. set的应用:UVa10815-Andy's First Dictionary

    Andy's First Dictionary Andy, 8, has a dream - he wants to produce his very own dictionary. This is ...

  5. SQL server游标基本结构

    简单游标遍历数据: BEGIN DECLARE QZ_cursor CURSOR SCROLL FOR /*创建游标*/ SELECT NAME FROM USERINFO/*要遍历的数据*/ OPE ...

  6. AbstractFactory(抽象工厂模式)

    AbstractFactory(抽象工厂模式) 有些情况下我们需要根据不同的选择逻辑提供不同的构造工厂,而对于多个工厂而言需要一个统一的抽象 <?php class Config { publi ...

  7. C. RMQ with Shifts

    C. RMQ with Shifts Time Limit: 1000ms Case Time Limit: 1000ms Memory Limit: 131072KB   64-bit intege ...

  8. 用KMP征服循环节问题

    以前我还是写过KMP的文章的 现在我们可以求一下循环节啊 Slot Machines Gym - 101667I #include<bits/stdc++.h> using namespa ...

  9. 鼠标移动或者鼠标点击div消失不见排查

    点击事件,导致某div或者容器样式隐藏,如果不能直接发现click事件绑定,那么首先排查哪些方法在控制div的样式, 然后看一看哪些方法在调用修改样式的方法. 然后再排查什么在调用修改样式的方法的方法 ...

  10. PTA 09-排序1 排序 (25分)

    题目地址 https://pta.patest.cn/pta/test/15/exam/4/question/720 5-12 排序   (25分) 给定NN个(长整型范围内的)整数,要求输出从小到大 ...