今天帮一个朋友的一台机器编译lamp环境,编译MYSQL的时候报如下错误: 63% Built target qa_auth_interface Scanning dependencies of target qa_auth_server 64% Building C object plugin/auth/CMakeFiles/qa_auth_server.dir/qa_auth_server.c.o Linking
今天帮一个朋友的一台机器编译lamp环境,编译MYSQL的时候报如下错误:
[ 63%] Built target qa_auth_interface
Scanning dependencies of target qa_auth_server
[ 64%] Building C object plugin/auth/CMakeFiles/qa_auth_server.dir/qa_auth_server.c.o
Linking C shared module qa_auth_server.so
[ 64%] Built target qa_auth_server
Scanning dependencies of target vio
[ 64%] Building C object vio/CMakeFiles/vio.dir/vio.c.o
[ 64%] Building C object vio/CMakeFiles/vio.dir/viosocket.c.o
[ 64%] Building C object vio/CMakeFiles/vio.dir/viossl.c.o
/home/centos/mysql-5.5.34/vio/viossl.c: In function ‘ssl_do’:
/home/centos/mysql-5.5.34/vio/viossl.c:175: error: ‘SSL_OP_NO_COMPRESSION’ undeclared (first use in this function)
/home/centos/mysql-5.5.34/vio/viossl.c:175: error: (Each undeclared identifier is reported only once
/home/centos/mysql-5.5.34/vio/viossl.c:175: error: for each function it appears in.)
make[2]: *** [vio/CMakeFiles/vio.dir/viossl.c.o] Error 1
make[1]: *** [vio/CMakeFiles/vio.dir/all] Error 2
make: *** [all] Error 2
google搜索了一下,有许多朋友遇到过了,有些朋友建议使用低版本的MYSQL进行编译,或者使用centos6.X的操作系统,centos6的操作系统编译MYSQL的时候确实没有遇到过这个个错误。
解决办法:
这其实是MYSQL的一个bug,官方已经发布了补丁,补丁打好之后再编译就可以过去了,具体页面请查看:http://bugs.mysql.com/bug.php?id=68999
[18 Apr 15:06] Remi Collet
Description:
Can't build with openssl 0.9.8e from RHEL / CentOS / Oracle Linux 5
How to repeat:
cmake -DWITH_SSL=system ...
/builddir/build/BUILD/mysql-5.5.31/vio/viossl.c:175: error: 'SSL_OP_NO_COMPRESSION' undeclared (first use in this function)
Suggested fix:
See trivial attached patch[18 Apr 15:07] Remi Collet
mysql-openssl.patchAttachment: mysql-openssl.patch (text/x-patch), 405 bytes.
PS:patch -p1 [26 Apr 10:49] Umesh Umesh
http://bugs.mysql.com/bug.php?id=69080 marked as duplicate of this one.
[24 May 10:58] Umesh Umesh
Hello Remi,
Thank you for the report.
Verified as described.
// How to repeat
[root@cluster1 mysqlcom-5.5.31]# openssl version
OpenSSL 0.9.8e-fips-rhel5 01 Jul 2008
[root@cluster1 mysqlcom-5.5.31]# cat /etc/redhat-release
Red Hat Enterprise Linux Server release 5.8 (Tikanga)
[root@cluster1 mysqlcom-5.5.31]# uname -a
Linux cluster1 2.6.32-100.26.2.el5 #1 SMP Tue Jan 18 20:11:49 EST 2011 x86_64 x86_64 x86_64 GNU/Linux
[root@cluster1 mysqlcom-5.5.31]# cmake -DCMAKE_INSTALL_PREFIX=/root/server/mysqlcom-5.5.31 -DWITH_SSL=system
[root@cluster1 mysqlcom-5.5.31]# make
..
...
Scanning dependencies of target vio
[ 63%] Building C object vio/CMakeFiles/vio.dir/vio.c.o
[ 63%] Building C object vio/CMakeFiles/vio.dir/viosocket.c.o
[ 63%] Building C object vio/CMakeFiles/vio.dir/viossl.c.o
/root/setup/mysqlcom-5.5.31/vio/viossl.c: In function assl_doa:
/root/setup/mysqlcom-5.5.31/vio/viossl.c:175: error: aSSL_OP_NO_COMPRESSIONa undeclared (first use in this function)
/root/setup/mysqlcom-5.5.31/vio/viossl.c:175: error: (Each undeclared identifier is reported only once
/root/setup/mysqlcom-5.5.31/vio/viossl.c:175: error: for each function it appears in.)
make[2]: *** [vio/CMakeFiles/vio.dir/viossl.c.o] Error 1
make[1]: *** [vio/CMakeFiles/vio.dir/all] Error 2
make: *** [all] Error 2[24 May 11:50] Erlend Dahl
Bug #69080 mysql-5.5.31 not compatible with openssl-1.0.0 and lower
was marked as a duplicate.[8 Jun 0:07] Noel Butler
5.5.32 also suffers same fate, i'm amazed oracle had ignored this and the simple included patch that fixes this.
[13 Jun 10:40] Georgi Kodinov
This openssl version is rather old. openssl recommends that you should consider upgrading to a later one.
Is there any obstacle with you upgrading to a recent version ?
Alternatively you can just download the binaries from http://dev.mysql.com/downloads.
[13 Jun 10:44] Remi Collet
> Is there any obstacle with you upgrading to a recent version ?
Enterprise Linux distribution provides backport for security fix.
I don't think upgrade to a more recent version is even thinkable on RHEL, Oracle Linux or other clones.
[13 Jun 10:57] Georgi Kodinov
It's a bit unfortunate that there's no compile time way to check for the presence of that fix.
Thanks for the explanations. It's a valid bug and needs to be fixed.
[28 Jun 14:39] Georgi Kodinov
I would really love if you can provide a way for us to recognize at compile time that this particular openssl version has been patched to include the fix (so I can safely #ifdef the fix that we did on our side).
Any chance that you would consider adding a define specific to your backport of the fix in this version that we can use ?
E.g. adding something like this :
#define OPENSSL_RHEL_COMPRESSION_FIX 1
to openssl.h would work great.
[29 Jun 14:04] Remi Collet
@Georgi Kodinov sorry, I really don't understand the need.
Feel free to open a request for change on RHEL, but...
Why do you think you need this and don't simply #ifdef SSL_OP_NO_COMPRESSION
[29 Jun 15:33] Hartmut Holzgraefe
I don't understand why this can't be fixed by a simple #ifdef (as in the originally attached patch) either ...
[1 Jul 11:51] Georgi Kodinov
Remi,
IMHO we need to be able to distinguish between an un-patched openssl 0.9.8e (that doesn't contain the fixes that you've backported to it) and your patched variant of the same library.
Otherwise there will not be enough information to determine whether to do the fix for this ssl bug in the mysql code or not.[29 Aug 14:21] Georgi Kodinov
Moving to "need feedback" based on the above question
[30 Sep 1:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
Tags - mysql , bug , ssl op no compression
原文地址:error: ‘SSL_OP_NO_COMPRESSION’ undeclared (first u, 感谢原作者分享。

在數據庫優化中,應根據查詢需求選擇索引策略:1.當查詢涉及多個列且條件順序固定時,使用複合索引;2.當查詢涉及多個列但條件順序不固定時,使用多個單列索引。複合索引適用於優化多列查詢,單列索引則適合單列查詢。

要優化MySQL慢查詢,需使用slowquerylog和performance_schema:1.啟用slowquerylog並設置閾值,記錄慢查詢;2.利用performance_schema分析查詢執行細節,找出性能瓶頸並優化。

MySQL和SQL是開發者必備技能。 1.MySQL是開源的關係型數據庫管理系統,SQL是用於管理和操作數據庫的標準語言。 2.MySQL通過高效的數據存儲和檢索功能支持多種存儲引擎,SQL通過簡單語句完成複雜數據操作。 3.使用示例包括基本查詢和高級查詢,如按條件過濾和排序。 4.常見錯誤包括語法錯誤和性能問題,可通過檢查SQL語句和使用EXPLAIN命令優化。 5.性能優化技巧包括使用索引、避免全表掃描、優化JOIN操作和提升代碼可讀性。

MySQL異步主從復制通過binlog實現數據同步,提升讀性能和高可用性。 1)主服務器記錄變更到binlog;2)從服務器通過I/O線程讀取binlog;3)從服務器的SQL線程應用binlog同步數據。

MySQL是一個開源的關係型數據庫管理系統。 1)創建數據庫和表:使用CREATEDATABASE和CREATETABLE命令。 2)基本操作:INSERT、UPDATE、DELETE和SELECT。 3)高級操作:JOIN、子查詢和事務處理。 4)調試技巧:檢查語法、數據類型和權限。 5)優化建議:使用索引、避免SELECT*和使用事務。

MySQL的安裝和基本操作包括:1.下載並安裝MySQL,設置根用戶密碼;2.使用SQL命令創建數據庫和表,如CREATEDATABASE和CREATETABLE;3.執行CRUD操作,使用INSERT,SELECT,UPDATE,DELETE命令;4.創建索引和存儲過程以優化性能和實現複雜邏輯。通過這些步驟,你可以從零開始構建和管理MySQL數據庫。

InnoDBBufferPool通過將數據和索引頁加載到內存中來提升MySQL數據庫的性能。 1)數據頁加載到BufferPool中,減少磁盤I/O。 2)臟頁被標記並定期刷新到磁盤。 3)LRU算法管理數據頁淘汰。 4)預讀機制提前加載可能需要的數據頁。

MySQL適合初學者使用,因為它安裝簡單、功能強大且易於管理數據。 1.安裝和配置簡單,適用於多種操作系統。 2.支持基本操作如創建數據庫和表、插入、查詢、更新和刪除數據。 3.提供高級功能如JOIN操作和子查詢。 4.可以通過索引、查詢優化和分錶分區來提升性能。 5.支持備份、恢復和安全措施,確保數據的安全和一致性。


熱AI工具

Undresser.AI Undress
人工智慧驅動的應用程序,用於創建逼真的裸體照片

AI Clothes Remover
用於從照片中去除衣服的線上人工智慧工具。

Undress AI Tool
免費脫衣圖片

Clothoff.io
AI脫衣器

AI Hentai Generator
免費產生 AI 無盡。

熱門文章

熱工具

MinGW - Minimalist GNU for Windows
這個專案正在遷移到osdn.net/projects/mingw的過程中,你可以繼續在那裡關注我們。 MinGW:GNU編譯器集合(GCC)的本機Windows移植版本,可自由分發的導入函式庫和用於建置本機Windows應用程式的頭檔;包括對MSVC執行時間的擴展,以支援C99功能。 MinGW的所有軟體都可以在64位元Windows平台上運作。

PhpStorm Mac 版本
最新(2018.2.1 )專業的PHP整合開發工具

SublimeText3漢化版
中文版,非常好用

SublimeText3 英文版
推薦:為Win版本,支援程式碼提示!

禪工作室 13.0.1
強大的PHP整合開發環境