dan*_*dan 11 php c linux configure
我需要在我的主目录中安装PHP,而不会污染我家外的任何目录[非常重要的要求!].在系统中,已经有旧版本的PHP运行.
我在这里找到了说明:http: //blog.thecybershadow.net/2013/01/25/installing-php-and-apache-module-under-home/
我作为普通用户在我的主目录中运行这些命令 dan
$ ./configure --prefix=/home/dan/php
$ make
$ INSTALL_ROOT=/home/dan/php make install
Run Code Online (Sandbox Code Playgroud)
该文章的作者指出,您需要使用两者--prefix并INSTALL_ROOT确保在您的家庭目录之外没有安装任何东西.
PHP安装(是的!),但不幸的是它安装在这里:
/home/dan/php/php55/home/dan/php/php55/bin
Run Code Online (Sandbox Code Playgroud)
虽然我希望在这里安装它:
/home/dan/php/php55/bin
Run Code Online (Sandbox Code Playgroud)
我该怎么办?我应该只使用一个指令吗?这是最新的和传统的方法是什么?
这很简单:
INSTALL_ROOT=/ DESTDIR=/ make install
Run Code Online (Sandbox Code Playgroud)
我想是因为这个,但我可能错了:
您同时使用$ PWD/configure --prefix =和带有make的INSTALL_ROOT变量.这两个选项是互斥的.
使用--prefix时,要求在make文件中安装的每个文件路径之前添加路径.然后使用INSTALL_ROOT变量.
配置创建静态make规则; 所以make无法有所作为:
它会添加第二次配置指定的路径.
| 归档时间: |
|
| 查看次数: |
2587 次 |
| 最近记录: |