歡迎您光臨本站 註冊首頁

FreeBSD用ports安裝Firefox不成功

←手機掃碼閱讀     火星人 @ 2014-03-09 , reply:0

  今天在FreeBSD 5.4 Release中安裝Firefox, 先更新ports tree到最新版本:
  
  FreeBSD# cvsup -g -L 2 /root/ports-supfile
  
  然後到Firefox的目錄中去執行make:
  
  FreeBSD# cd /usr/ports/www/firefox
  FreeBSD# make
  
  沒多久,系統就爆出了編譯錯誤:
  
  nsHostResolver.h:95: error: ISO C forbids declaration of `PRAddrInfo' with no type
  nsHostResolver.h:95: error: expected `;' before '*' token
  nsHostResolver.h: In member function `PRBool nsHostRecord::HasResult() const':
  nsHostResolver.h:99: error: `addr_info' undeclared (first use this function)
  nsHostResolver.h:99: error: (Each undeclared identifier is reported only once for each function it appears in.)
  nsHostResolver.h: At global scope:
  nsHostResolver.h:209: error: `PRAddrInfo' has not been declared
  nsHostResolver.h:209: error: ISO C forbids declaration of `parameter' with no type
  nsDNSService2.cpp: In member function `virtual nsresult nsDNSRecord::GetCanonicalName(nsACString&)':
  nsDNSService2.cpp:95: error: 'class nsDerivedSafe' has no member named 'addr_info'
  nsDNSService2.cpp:96: error: 'class nsDerivedSafe' has no member named 'addr_info'
  nsDNSService2.cpp:96: error: `PR_GetCanonNameFromAddrInfo' undeclared (first use this function)
  nsDNSService2.cpp: In member function `virtual nsresult nsDNSRecord::GetNextAddr(PRUint16, PRNetAddr*)':
  nsDNSService2.cpp:112: error: 'class nsDerivedSafe' has no member named 'addr_info'
  nsDNSService2.cpp:113: error: 'class nsDerivedSafe' has no member named 'addr_info'
  nsDNSService2.cpp:113: error: `PR_EnumerateAddrInfo' undeclared (first use this function)
  nsDNSService2.cpp: In member function `PRUint16 nsDNSService::GetAFForLookup(const nsACString&)':
  nsDNSService2.cpp:528: error: `PR_AF_UNSPEC' undeclared (first use this function)
  gmake[4]: *** [nsDNSService2.o] Error 1
  gmake[4]: Leaving directory `/usr/ports/www/firefox/work/mozilla/netwerk/dns/src'
  gmake[3]: *** [libs] Error 2
  gmake[3]: Leaving directory `/usr/ports/www/firefox/work/mozilla/netwerk/dns'
  gmake[2]: *** [libs] Error 2
  gmake[2]: Leaving directory `/usr/ports/www/firefox/work/mozilla/netwerk'
  gmake[1]: *** [tier_9] Error 2
  gmake[1]: Leaving directory `/usr/ports/www/firefox/work/mozilla'
  gmake: *** [default] Error 2
  *** Error code 2
  
  引起這個問題的原因是Firefox在老版本的nspr上會存在問題,無法通過編譯!
  
  於是決定安裝新版的依賴包:
  
  FreeBSD# cd /usr/ports
  FreeBSD# make search name=nspr
  
  查出來有如下幾個:
  Port:  nspr-4.4.1_1


  Path:  /usr/ports/devel/nspr
  
  Port:  dnsproxy-1.13
  Path:  /usr/ports/dns/dnsproxy
  
  Port:  transproxy-1.5
  Path:  /usr/ports/www/transproxy
  
  對他們一一進行make, make install后,再來安裝firefox即可!


[火星人 ] FreeBSD用ports安裝Firefox不成功已經有754次圍觀

http://coctec.com/docs/linux/show-post-56352.html