Home Backend Development PHP Tutorial 64位系统上编译PHP找不到库文件有关问题

64位系统上编译PHP找不到库文件有关问题

Jun 13, 2016 pm 01:19 PM
enable openssl usr with

64位系统下编译PHP找不到库文件问题

最近在64位系统上编译5.4.5版的PHP时,遇到报以下错:

checking for DSA_get_default_method in -lssl... yes
checking for X509_free in -lcrypto... yes
checking for pkg-config... /usr/bin/pkg-config
configure: error: Cannot find OpenSSL's libraries
Copy after login

指定的编译参数:

./configure \
--prefix=/usr/local/services/php-5.4.5 \
--with-config-file-path=/usr/local/services/php-5.4.5/etc \
--enable-fpm \
--enable-mbstring \
--enable-soap \
--enable-sockets \
--enable-zip \
--with-curl=/usr \
--with-mysql=mysqlnd \
--with-mysqli=mysqlnd \
--with-pdo-mysql=mysqlnd \
--with-gd \
--with-jpeg-dir=/usr \
--with-png-dir=/usr \
--with-zlib-dir=/usr \
--with-freetype-dir=/usr \
--with-openssl=/usr
Copy after login

找不到openssl的库文件,但我明明有安装openssl-devel的,很奇怪,网上搜了一下,发现有很多朋友,遇到了同样的问题,有些人说--with-openssl不指定路径可解决,尝试了一下,的确编译通过了,但想不通,Why?后来,又搜了一些文章来看,终于找出问题的根源:安装的系统是64位的,而64位的用户库文件默认是在/usr/lib64,而我编译的时候,没有指定--with-libdir=lib64,而编译脚本默认是lib,这当然是找不到的。

将编译参数更改为:

./configure \
--prefix=/usr/local/services/php-5.4.5 \
--with-config-file-path=/usr/local/services/php-5.4.5/etc \
--enable-fpm \
--enable-mbstring \
--enable-soap \
--enable-sockets \
--enable-zip \
--with-curl=/usr \
--with-mysql=mysqlnd \
--with-mysqli=mysqlnd \
--with-pdo-mysql=mysqlnd \
--with-gd \
--with-jpeg-dir=/usr \
--with-png-dir=/usr \
--with-zlib-dir=/usr \
--with-freetype-dir=/usr \
--with-openssl=/usr \
--with-libdir=lib64
Copy after login

问题解决。

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
2 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Repo: How To Revive Teammates
4 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Hello Kitty Island Adventure: How To Get Giant Seeds
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

How Nginx uses the OpenSSL library for more secure communication How Nginx uses the OpenSSL library for more secure communication Jun 10, 2023 pm 01:51 PM

Nginx is a software widely used in web servers, load balancers, reverse proxies and caches. During network transmission, data encryption and security have received increasing attention. In order to improve the security of communication, the OpenSSL library can be used to implement the SSL/TLS protocol to protect the transmission of sensitive data. This article will explain how to use Nginx and the OpenSSL library to achieve more secure communication. Install and configure the OpenSSL library. First, you need to install the OpenSSL library on the server. Can make

What does enable mean in computer What does enable mean in computer Aug 30, 2023 pm 01:55 PM

In computers, enable refers to enabling or activating a certain function or option. In the computer field, enable is usually used to describe the process of enabling a certain function or option in software or hardware. Detailed introduction: 1. In terms of software, enable usually refers to enabling a certain function in an application or operating system; 2. In terms of hardware, enable usually refers to enabling a certain device or interface in a computer system.

How to generate a MySQL SSL certificate using OpenSSL How to generate a MySQL SSL certificate using OpenSSL Sep 09, 2023 pm 02:12 PM

Introduction to how to use OpenSSL to generate a MySQL SSL certificate: MySQL is a widely used relational database system. It is very important to use the SSL (SecureSocketsLayer) protocol for encrypted communication in actual production environments. This article will introduce how to use the OpenSSL tool to generate a MySQL SSL certificate and provide corresponding code examples. Steps: Install OpenSSL: First, make sure you have OpenSSL installed on your computer

OpenBLAS installation under CentOS 7 and CentOS 7 OpenSSL installation OpenBLAS installation under CentOS 7 and CentOS 7 OpenSSL installation Feb 10, 2024 am 11:45 AM

As an open source operating system, LINUX has a wide range of applications and user groups. CentOS7 is a branch version of LINUX. It is built based on the RedHat Enterprise Linux (RHEL) source code and has a high degree of stability and security. It can be installed and configured on CentOS7 OpenBLAS and OpenSSL are common needs of many developers and system administrators. This article will detail how to install and configure OpenBLAS and OpenSSL on CentOS7. OpenBLAS is an open source high-performance mathematics library based on the BLAS (BasicLinearAlgebraSubprograms) interface.

Demystifying the with keyword in Python Demystifying the with keyword in Python Apr 14, 2023 am 11:31 AM

Many of us have seen this snippet over and over again in Python code: with open('Hi.text', 'w') as f: f.write("Hello, there") However, some of us Some people don't know what with is used for and why we need to use it here. In this read, you'll find out about almost any problem that can be solved with. let's start! First, let's consider what we need to do without using the with keyword. In this case we need to open the file first and try to write. Regardless of success or failure, we'd better be

Ubuntu system uses vsftpd to build FTP server. Ubuntu system uses vsftpd to build FTP server. Feb 18, 2024 pm 05:50 PM

To use vsftpd to build an FTP server on an Ubuntu system, you can follow the steps below: Install vsftpd: Open a terminal and execute the following command to install vsftpd: sudoaptupdatesudoaptinstallvsftpd Configure vsftpd: Use a text editor (such as nano or vi) to open the configuration of vsftpd File: sudonano/etc/vsftpd.conf In the configuration file you can make the following changes or add as needed: Enable anonymous access (if needed): anonymous_enable=YES Disable anonymous upload (if needed): anon_upload

How to perform encryption and decryption in OpenSSL basics How to perform encryption and decryption in OpenSSL basics May 22, 2023 am 09:20 AM

Speaking of OpenSSL, the first thing to mention is SSL. When we use the Internet every day, I am afraid that no one wants to be monitored by others on the Internet. Therefore, a protocol is needed to protect our network communications. The SSL protocol was developed based on this working background. It can prevent the communication between the user and the server application from being eavesdropped by attackers, and always authenticate the server and optionally authenticate the user. SSL protocols are usually built on top of the reliable Transport Layer Protocol (TCP). The advantage of the SSL protocol is that it is independent of application layer protocols. High-level application layer protocols (such as HTTP, FTP, TELNET, etc.) can be transparently built on the SSL protocol. SSL protocol in application

Crypto library in PHP8.0: OpenSSL Crypto library in PHP8.0: OpenSSL May 14, 2023 am 08:52 AM

With the continuous development of Internet technology, network security issues have attracted more and more attention. In modern network applications, data encryption and decryption and protecting the security of data transmission have become crucial issues. As a server-side programming language widely used in Web applications, PHP provides us with a solution for secure data transmission - the OpenSSL encryption library. OpenSSL is an open source software library that supports several protocols and algorithms. This library provides a series of functions to support SSL and TLS

See all articles