ubuntu上ACE六步安裝和所遇問題解決方案

來源:互聯網
上載者:User

ACE六步配置:

一、於http://download.dre.vanderbilt.edu/下載相應平台的ACE包,這裡寫道如果是windows平台下載.zip包,其他平台下載.gz或bz2包,我是烏布圖選擇了個gz包,我用的是6.0.0;

二、解壓包,裡面有個ACE-INSTALL.html文檔,線上頁面地址為http://www.dre.vanderbilt.edu/~schmidt/DOC_ROOT/ACE/ACE-INSTALL.html#unix,按此過程,進行接下來的安裝配置;

三、終端命令列內,在所解壓的目錄(例如/home/administrator/libs/ACE_wrappers)內,建立目錄objdir(例如/home/administrator/libs/ACE_wrappers/objdir),並進入之,如下命令:

   mkdir objdir
cd objdir

四、運行命令../configure,這個命令有個參數選項,具體參看資料吧,懶得啃英文也木法,誰讓代碼都是字母呢;

五、運行make命令,編譯庫;

六、運行make install命令完成安裝。

 

ACE配置make所遇到的問題:

1.如果按照上述說明中的安裝方法,第五步可能會出現問題,一般在自行編譯源碼所碰到的錯誤都會是系統缺少軟體包所致,我所遇到的問題是跟ssl有關係,警示如下:

http://www.cnblogs.com/../ace/SSL/SSL_Asynch_BIO.h:29:25: error: openssl/bio.h: 沒有那個檔案或目錄

原因:缺少openssl或者找不到openssl的標頭檔;

解決:去http://www.openssl.org/source/下載latest程式,經過一番./configure、make、make install安裝套路,還有一步為做個連結:

cd /usr/include

ln -s /usr/local/ssl/include/openssl openssl

 

2.又遇到錯誤,如下:

home/knight/libs/ACE_wrappers/objdir/examples/IPC_SAP/SSL_SAP/http://www.cnblogs.com/http://www.cnblogs.com/ace/SSL/SSL_SOCK_Stream.inl:148: undefined reference to `SSL_read'
/home/knight/libs/ACE_wrappers/objdir/examples/IPC_SAP/SSL_SAP/http://www.cnblogs.com/http://www.cnblogs.com/ace/SSL/SSL_SOCK_Stream.inl:151: undefined reference to `SSL_get_error'
client-SSL-client.o: In function `ACE_SSL_SOCK_Stream::close()':
/home/knight/libs/ACE_wrappers/objdir/examples/IPC_SAP/SSL_SAP/http://www.cnblogs.com/http://www.cnblogs.com/ace/SSL/SSL_SOCK_Stream.inl:305: undefined reference to `SSL_shutdown'

原因:在編譯${ACE_ROOT}/objdir/tests/SSL和${ACE_ROOT}/examples/IPC_SAP/SSL_SAP中makefile指定的庫路徑LIBS指定有誤;
解決:找到makefile裡的LIBS = -lrt -ldl,在後面添加路徑【 /usr/local/ssl/lib/libssl.a /usr/local/ssl/lib/libcrypto.a】(注意,這兩個靜態庫路徑不是絕對的)。

 

安裝完成

make install 成功後會有如下顯示:

----------------------------------------------------------------------
Libraries have been installed in:
   /usr/local/lib

If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the `-LLIBDIR'
flag during linking and do at least one of the following:
   - add LIBDIR to the `LD_LIBRARY_PATH' environment variable
     during execution
   - add LIBDIR to the `LD_RUN_PATH' environment variable
     during linking
   - use the `-Wl,-rpath -Wl,LIBDIR' linker flag
   - have your system administrator add LIBDIR to `/etc/ld.so.conf'

See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
----------------------------------------------------------------------

預設的安裝路徑是在/usr/local/lib;

如果程式運行需要動態庫.so檔案時,需要指定環境變數LD_LIBRARY_PATH;

如果程式串連編譯需要動態庫.so檔案時,需要指定環境變數LD_RUN_PATH。

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.