作者 主題: 怎麼更改FreeBSD搜尋shared library的路徑??  (閱讀 5915 次)

0 會員 與 1 訪客 正在閱讀本文。

cmwang

  • 活潑的大學生
  • ***
  • 文章數: 328
    • 檢視個人資料
最近因為幫user補弱點,須要更新OpenSSL,用pkg_info看是沒裝,但在/usr/lib內卻有libcrypto相關檔案,如果直接用ports裝的話因為會裝到/usr/local/lib,AP不見得會用到,開完機後雖然可以手動用ldconfig改,可是重開機又會回到預設的/lib:/usr/lib:/usr/lib/compat:/usr/local/lib,鵝又不敢直接把原來的libcrypto幹掉,請問一下要怎麼改才能讓每次開機都維持在/usr/local/lib:/lib:/usr/lib:/usr/lib/compat啊 ??? ???....
不要,不要,我不要這種顏色的帽子 ;D ;D....

cmwang

  • 活潑的大學生
  • ***
  • 文章數: 328
    • 檢視個人資料
Re: 怎麼更改FreeBSD搜尋shared library的路徑??
« 回覆 #1 於: 2013-10-04 13:37 »
鵝後來找到Keep OpenSSL updated FreeBSD,大家參考參考吧 :) :)....
不要,不要,我不要這種顏色的帽子 ;D ;D....

rainday

  • 鑽研的研究生
  • *****
  • 文章數: 740
  • 性別: 男
  • enhancing and optimizing
    • 檢視個人資料
Re: 怎麼更改FreeBSD搜尋shared library的路徑??
« 回覆 #2 於: 2013-10-04 14:44 »
或者也可以調整 /etc/ld.so.conf ,愈前面的愈優先
<0  =_=  Don't learn to hack , hack to learn.

cmwang

  • 活潑的大學生
  • ***
  • 文章數: 328
    • 檢視個人資料
Re: 怎麼更改FreeBSD搜尋shared library的路徑??
« 回覆 #3 於: 2013-10-04 14:46 »
或者也可以調整 /etc/ld.so.conf ,愈前面的愈優先

不好意思,/etc/ld.so.conf是linux的,FreeBSD沒這玩意 :-\ :-\....
不要,不要,我不要這種顏色的帽子 ;D ;D....

rainday

  • 鑽研的研究生
  • *****
  • 文章數: 740
  • 性別: 男
  • enhancing and optimizing
    • 檢視個人資料
Re: 怎麼更改FreeBSD搜尋shared library的路徑??
« 回覆 #4 於: 2013-10-04 14:54 »
sorry 沒注意到是在bsd版面,手邊沒bsd可看
不過搜尋一下,可能man ldconfig就會有寫說明,不過要試試
http://lists.freebsd.org/pipermail/freebsd-hackers/2003-June/001746.html

FILES
     /var/run/ld.so.hints     Standard hints file for the a.out dynamic
              linker.
     /var/run/ld-elf.so.hints     Standard hints file for the ELF dynamic
              linker.
     /etc/ld.so.conf        Conventional configuration file containing
              directory names for invocations with -aout.
     /etc/ld-elf.so.conf     Conventional configuration file containing
              directory names for invocations with -elf.
     /var/run/ld-elf32.so.hints
     /var/run/ld32.so.hints     Conventional configuration files containing
              directory names for invocations with -32.
     /etc/objformat        Determines whether -aout or -elf is the
              default.  If present, it must consist of a
              single line containing either
              'OBJFORMAT=aout' or 'OBJFORMAT=elf'.
<0  =_=  Don't learn to hack , hack to learn.