【待完善】make: command not found,以及libtool.m4 and ltmain.sh have a version mismatch問題的解決方案...

之前為了使用一個庫,都是去下載源碼,然后根據開發者提供的README手動用GCC編譯,一直不能使用Makefile感覺很蛋痛,比如最近使用的ZThread

還是怪自己以前過于依賴IDE

?

最近發現用Cygwin就可以使用諸如./configure, make這樣的命令,感覺灰常欣喜,嘗試去編譯ZThread庫(因為我發現雖然之前我用GCC手動編譯了ZThread但是在使用的過程中,ZThread總是往控制臺上打印諸多的DEBUG信息,想必是編譯選項的問題,我又不知道到哪個頭文件中去找#define DEBUG,所以就想使用make,看使用ZThread作者寫的configuration文件以及Makefile來編譯能不能解決問題)

?

剛剛下載下來Cygwin就等著上去configure+make呢,問題就來了,輸入./configure之后,等了一段時間報錯(見紅色文字):

$ ./configure
checking build system type... i686-pc-cygwin
checking host system type... i686-pc-cygwin
checking target system type... i686-pc-cygwin
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
Loading m4 macros from share
checking for g++... g++
checking for C++ compiler default output file name... a.exe
checking whether the C++ compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables... .exe
checking for suffix of object files... o
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking for style of include used by make... GNU
checking dependency style of g++... gcc3
checking for gcc... gcc
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ANSI C... none needed
checking dependency style of gcc... gcc3
checking how to run the C preprocessor... gcc -E
checking for egrep... grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking pthread.h usability... no
checking pthread.h presence... no
checking for pthread.h... no
checking for sched_get_priority_max in -lrt... no
checking for sched_yield... no
checking for pthread_yield... no
checking for pthread_key_create... no
checking for pthread_keycreate... no
checking for doxygen... no
detecting for ftime() function
checking sys/time.h usability... yes
checking sys/time.h presence... yes
checking for sys/time.h... yes
checking for _ftime()... yes
checking how to run the C++ preprocessor... g++ -E
checking for ANSI C header files... (cached) yes
checking errno.h usability... yes
checking errno.h presence... yes
checking for errno.h... yes
checking for target implementation... compile-time guess
checking for sigsetjmp()... no
checking for _beginthreadex()... no
checking for a sed that does not truncate output... /usr/bin/sed
checking for ld used by gcc... d:/mingw/mingw32/bin/ld.exe
checking if the linker (d:/mingw/mingw32/bin/ld.exe) is GNU ld... yes
checking for d:/mingw/mingw32/bin/ld.exe option to reload object files... -r
checking for BSD-compatible nm... /cygdrive/d/MinGW/bin/nm -B
checking whether ln -s works... yes
checking how to recognise dependent libraries... file_magic ^x86 archive import|^x86 DLL
checking dlfcn.h usability... no
checking dlfcn.h presence... no
checking for dlfcn.h... no
checking how to run the C++ preprocessor... g++ -E
checking for g77... no
checking for f77... no
checking for xlf... no
checking for frt... no
checking for pgf77... no
checking for fort77... no
checking for fl32... no
checking for af77... no
checking for f90... no
checking for xlf90... no
checking for pgf90... no
checking for epcf90... no
checking for f95... no
checking for fort... no
checking for xlf95... no
checking for ifc... no
checking for efc... no
checking for pgf95... no
checking for lf95... no
checking for gfortran... no
checking whether we are using the GNU Fortran 77 compiler... no
checking whether  accepts -g... no
checking the maximum length of command line arguments... 8192
checking command to parse /cygdrive/d/MinGW/bin/nm -B output from gcc object... ok
checking for objdir... .libs
checking for ar... ar
checking for ranlib... ranlib
checking for strip... strip
checking for correct ltmain.sh version... grep: character class syntax is [[:space:]], not [:space:]
no*** Gentoo sanity check failed! ***
*** libtool.m4 and ltmain.sh have a version mismatch! ***
*** (libtool.m4 = 1.5.10, ltmain.sh = ) ***Please run:libtoolize --copy --forceif appropriate, please contact the maintainer of this
package (or your distribution) for help.

輸入:libtoolize --copy --force提示libtoolize: command not found

咋辦?搜了一下相關的問題,原來是因為安裝Cygwin的時候沒有安裝libtool

重新運行Cygwin-setup(注意,無需卸載,重新運行setup,選擇你沒有安裝的package即可),搜索libtool,勾選并安裝,問題解決

?

然后再次運行libtoolize --copy --force,又報錯:

$ libtoolize --copy --force
libtoolize: putting auxiliary files in `.'.
libtoolize: copying file `./ltmain.sh'
libtoolize: You should add the contents of the following files to `aclocal.m4':
libtoolize:   `/usr/share/aclocal/libtool.m4'
libtoolize:   `/usr/share/aclocal/ltoptions.m4'
libtoolize:   `/usr/share/aclocal/ltversion.m4'
libtoolize:   `/usr/share/aclocal/ltsugar.m4'
libtoolize:   `/usr/share/aclocal/lt~obsolete.m4'
libtoolize: Consider adding `AC_CONFIG_MACRO_DIR([m4])' to configure.ac and
libtoolize: rerunning libtoolize, to keep the correct libtool macros in-tree.
libtoolize: Consider adding `-I m4' to ACLOCAL_AMFLAGS in Makefile.am.

又搜了一下,在這篇BLOG說是因為沒安裝autoconf的原因,再回去安裝autoconf,如圖

?

再試一次libtoolize --copy --force

結果還是報同樣的錯誤,回頭去看(上面有圖,就是libtool那張)原來是libtool-debuginfo和cygwin64-libtool沒有安裝

于是安裝libtool-debuginfo和cygwin64-libtool

再試一次libtoolize --copy --force,成功運行

好了,繼續:./configure --prefix D:/ZThread/bin #--prefix指定編譯時輸出二進制文件的目錄

然后還是報錯,又運行libtoolize --copy --force,還是報錯,無語了

然后,上網搜了半天,在這里找到提示說使用:autoreconf --force --install --symlink

然后又報錯Can't exec "aclocal"

繼續搜,在這里找到提示說要安裝automake(然后我就去Cygwin-setup安裝了automake-1.8,注意不要重復安裝多個版本,否則會出問題)

?

然后輸入make install又提示make: command not found

還是同樣的套路,把make package給勾選安裝就行了

?

轉載于:https://www.cnblogs.com/qrlozte/p/4135847.html

本文來自互聯網用戶投稿,該文觀點僅代表作者本人,不代表本站立場。本站僅提供信息存儲空間服務,不擁有所有權,不承擔相關法律責任。
如若轉載,請注明出處:http://www.pswp.cn/news/376447.shtml
繁體地址,請注明出處:http://hk.pswp.cn/news/376447.shtml
英文地址,請注明出處:http://en.pswp.cn/news/376447.shtml

如若內容造成侵權/違法違規/事實不符,請聯系多彩編程網進行投訴反饋email:809451989@qq.com,一經查實,立即刪除!

相關文章

ubuntu 12.04 下安裝 MySQL 5.5

參考:http://www.linuxidc.com/Linux/2011-12/48920.htm《Ubuntu 11.04 通過 apt 安裝 MySQL 5.1 的全過程記錄》 說明:在mysql官網下載ubuntu下的安裝包進行安裝,不是一件容易的事。這里不是指下載,而是指安裝配置過程。 所以可以…

160 - 17 bjanes.3

環境: Wiondws XP sp3 工具: ollydbg,ExeInfo PE 查殼: 用Exeinfo PE 查殼,沒有殼,是VB寫的 過程: 一:隨便輸入一個serial,得到一個錯誤信息消息框,OD載入…

菜鳥nginx源碼剖析

菜鳥nginx源碼剖析 配置與部署篇(一) 手把手配置nginx “I love you” TCMalloc 對MYSQL 性能 優化的分析 菜鳥nginx源碼剖析系列文章解讀 Author:Echo Chen(陳斌) Email:chenb19870707gmail.com Blog&…

很有挫敗感

總會時不時的懷疑自己是不是學編程的料,還是自己太笨? 自己讀研前對編程可以說是一竅不通,雖然本科時學過C,但那時也只是應付考試,沒學到什么真才實學。 幸好讀研后,自己開始猛的補各種知識,開始…

160 - 18 Brad Soblesky.1

環境: windows xp sp3 工具: Ollydbg,exeinfope 用exeinfope查殼: 沒有殼,vc編譯的 運行后第一步,隨便輸入個”12345“,彈出一個錯誤消息框。 OD載入后直接搜索錯誤消息框的字符串&#xff0c…

漢字轉拼音縮寫

漢字轉拼音縮寫 /// 〈summary〉 /// 漢字轉拼音縮寫 /// Code By MuseStudiohotmail.com /// 2014-12-02 /// 〈/summary〉 /// 〈param name"str"〉要轉換的漢字字符串〈/param〉 /// 〈returns〉拼音縮寫〈/returns〉 public string GetPYString(string str) { s…

160 - 19 Brad Soblesky.2

環境: windows xp sp3 工具: OD,exeinfope 查殼: 用exeinfope查殼,發現沒有殼而且是vc編譯的 隨便輸入一個name和serial,name "12345" serial "678910" 彈出錯誤窗口&#xff0c…

微信公眾平臺開發(59)相冊

微信公眾平臺開發 微信公眾平臺開發模式 企業微信公眾平臺 萬能相冊 3G相冊作者:方倍工作室 地址:http://www.cnblogs.com/txw1958/p/weixin-59-albums.html 相冊(Photo album)又稱影集或照片集,是用來裝放相片的物品。相冊主要用來收藏和保…

BugFix系列---開篇介紹

這個系列的文章,主要目的在于積累總結實際開發中遇到的錯誤,記錄下來自己的解決思路,用來提升自己。 不出意外,應該會持續不斷的記錄更新,在整個開發openstack的過程中,抓住機會吸取開源界大牛的有點經驗&a…

160 - 20 BuLLeT.8

環境: Windows xp sp3 工具: exeinfope, ollydbg 查殼: 用exeinfope查殼,發現加了殼 -- WWPack32 ver 1.xx ,用f8單步調試法,脫殼。 脫掉之后發現是delphi寫的 運行之后發現界面整潔,目標明…

hadoop學習筆記:zookeeper學習(上)

在前面的文章里我多次提到zookeeper對于分布式系統開發的重要性,因此對zookeeper的學習是非常必要的。本篇博文主要是講解zookeeper的安裝和zookeeper的一些基本的應用,同時我還會教大家如何安裝偽分布式,偽分布式不能在windows下實現&#x…

戀愛Linux(Fedora20)2——安裝Java運行環境(JDK)

因為Fedora20自帶OpenJDK,所以我們先刪除掉自帶的: 1)查看當前的jdk情況 # rpm -qa|grep jdk 2)卸載openjdk # yum -y remove java java-1.7.0-openjdk* 3)下載JDK(我用的是這個,大家用什么版本可以自行選擇)。 http://download.csdn.net/det…

160 - 21 Cabeca

環境: Windows xp sp3 工具: exeinfope ollydbg 查殼: 拿到程序后查殼,發現程序無殼,為Delphi寫的。 程序長成這個樣 輸入: Name:GNUBD Serial:1234567 Serial:76543…

JS函數重載解決方案

JS的函數定義可以指定形式參數名稱,多多少少我們會以為js至少可以支持參數個數不同的方法重載,然而遺憾的是這僅僅是一個假象,js所有的參數都是以arguments傳遞過去的,這個參數類似于數組,在函數調用的時候&#xff0c…

JS中replace替換全部元素的解決辦法

JavaScript中replace() 方法如果直接用str.replace("-","!") 只會替換第一個匹配的字符. 然而我們大多數需要替換的是全部匹配的元素,而JavaScript又沒有java中的replaceAll的方法,這個時候就需要特殊處理了。 String repace(new R…

160 - 22 CarLitoZ.1

環境 Windows xp sp3 工具 exeinfope Ollydbg 查殼 無殼的VB程序 測試 輸入“1234567” 顯示這個: 直接OD載入字符串搜索。 00402D20 > \55 push ebp 00402D21 . 8BEC mov ebp,esp 00402D23 . 83EC 0C sub e…

實戰MEF(4):搜索范圍

在前面的文章中,幾乎每個示例我們都會接觸到擴展類的搜索位置,我們也不妨想一下,既然是自動擴展,它肯定會有一個或者多人可供查找的位置,不然MEF框架怎么知道哪里有擴展組件呢? 就像我們用導航系統去查找某…

Android應用程序請求SurfaceFlinger服務創建Surface的過程分析

文章轉載至CSDN社區羅升陽的安卓之旅,原文地址:http://blog.csdn.net/luoshengyang/article/details/7884628 前面我們已經學習過Android應用程序與SurfaceFlinger服務的連接過程了。連接上SurfaceFlinger服務之后,Android應用程序就可以請求…

Oracle面試題(基礎篇)

1. Oracle跟SQL Server 2005的區別? 宏觀上: 1). 最大的區別在于平臺,oracle可以運行在不同的平臺上,sql server只能運行在windows平臺上,由于windows平臺的穩定性和安全性影響了sql server的穩定性和安全性 2). oracl…

160 - 23 Chafe.1

環境 Windows xp sp3 工具 exeinfope ollydbg 查殼 用exeinfoe查殼 測試 可以從左下角狀態欄看出serial是無效的 直接OD載入字符串搜索 00401274 |. /75 17 jnz XChafe_1.0040128D 00401276 |. |6A 00 push 0x0 ; /Ti…