unp原始碼檔案編譯安裝

2021-08-07 13:45:02 字數 914 閱讀 2088

./configure

cd lib

make

cd ../libfree

make

此處報錯:

inet_ntop.c:56:1: error: conflicting types for 『inet_ntop』

inet_ntop(af, src, dst, size)

^ /usr/include/arpa/inet.h:77:13: note: previous declaration is here

const char inet_ntop(int, const void , char , socklen_t);

^ 1 error generated.

make: ** [inet_ntop.o] error 1

提示函式inet_ntop重複宣告了,其實是 標頭檔案重複包含了。

解決方法

找到inet_ntop.c檔案把#include這行注釋掉,重新make即可成功!

cd ..  // 回到主目錄

// 修改 unp.h

vim ./lib/unp.h // 修改 #include "../config.h" 為 #include "config.h"

// 拷貝標頭檔案

sudo cp ./config.h /usr/local/include

sudo cp ./lib/unp.h /usr/local/include

// 拷貝庫檔案

sudo cp ./libunp.a /usr/local/lib

手動編譯原始碼安裝mysql 原始碼編譯安裝mysql

1 安裝mysql需要的依賴包 yum y install ncurses devel libaio devel 2 安裝編譯mysql需要的軟體 mysql 有3個版本分支 5.0 5.1系列 5.4 5.7系列 6.0 7.1群集產品系列 最早的mysql 5.0 5.1產品 直接.config...

ubuntu git 原始碼編譯安裝

本文發布時最新的git版本是1.7.4.3 安裝git依賴的工具和庫 sudo apt get build dep git core git doc tar xf git v1.7.4.3.tar.gz cd git git b3229df 編譯make prefix usr local all d...

rsync原始碼編譯安裝

2.解壓,進入rsync目錄 3.configure prefix usr local rsync 4.make make install 5.ln s usr local rsync bin rsync usr local bin rsync 6.配置server 1 vi usr local r...