當前位置:首頁 » 編程軟體 » glibc編譯安裝

glibc編譯安裝

發布時間: 2022-07-06 12:23:58

Ⅰ mac如何安裝32位glibc和glibc-devel

1.先下載這個安裝包
2.解壓 順便問下 是tar什麼包? tar.gz tar.bz ???
tar -zxvf *********.tar.gz
tar -jxvf ********.tar.bz
3.進入解壓目錄
cd home/你的用戶名/mysql解壓目錄
4.編譯安裝
./configure 注意 在這一步時 如果你機器上缺少依賴的話 會有提示 先安裝依賴 在重來這一步
make
su -c'make install'

好了 這就安裝完成了 不過 為什麼不用源安裝? 所有的自動解決 。。。
實在不行 下載相應的rpm包或者deb包 都比較好安裝... 要還是不明白 可以去www.osmsg.com看看有沒有相關資料

linux中如何升級glibc

編譯安裝glibc
1.下載glibc

wgethttp://ftp.gnu.org/gnu/glibc/glibc-2.3.2.tar.gz

2.下載glibc-linuxthreads

wgethttp://ftp.gnu.org/gnu/glibc/glibc-linuxthreads-2.3.2.tar.gz

3.解壓

tar-zxvfglibc-2.3.2.tar.gz
cdglibc-2.3.2
tar-zxvf../glibc-linuxthreads-2.3.2.tar.gz
cd..
./glibc-2.3.2/configure--prefix=/usr--disable-profile--enable-add-ons--libexecdir=/usr/lib--with-headers=/usr/include
make
makeinstall

注意點:
1、要將glibc-linuxthreads解壓到glibc目錄下。
2、不能在glibc當前目錄下運行configure

Ⅲ 如何安裝glibc-2.7

GNU C庫(glibc)是標准C庫的GNU實現。glibc是GNU工具鏈的關鍵組件,用於和二進制工具和編譯器一起使用,為目標架構生成用戶空間應用程序。

Ⅳ Linux安裝uclibc交叉編譯工具鏈的步驟如要將原先的glibc卸載嗎

……肯定不能卸載原來的glibc,卸了之後整個系統都不能用了
你要編譯的uclibc是linux->arm的和arm->arm的,glibc是給linux->linux用的

Ⅳ ubuntu 12.04怎麼安裝 glibc

ubuntu 12.04 好像是eglibc, 不是glibc, 安裝eglibc 請sudo apt-get install libc-dev-bin

如果一定要裝glibc, 請源碼編譯, 但是, 一定注意, 不能覆蓋掉原來的eglibc, 可以通過configure 時添加--prefix=安裝位置來安裝. 然而這並沒有什麼鳥用, 因為, 這種方式安裝上的glibc 沒法用.

Ⅵ linux glibc默認安裝在哪

GNU C庫(glibc)是標准C庫的GNU實現。glibc是GNU工具鏈的關鍵組件,用於和二進制工具和編譯器一起使用,為目標架構生成用戶空間應用程序。
當從源碼進行構建時,一些Linux程序可能需要鏈接到某個特定版本的glibc。在這種情況下,你可能想要檢查已安裝的glibc信息以查看是否滿足依賴關系。
這里介紹幾種簡單的方法,方便你檢查Linux上的glibc版本。
方法一
下面給出了命令行下檢查GNU C庫的簡單命令。
$ ldd --version
在本例中,glibc版本是2.19。
方法二
另一個方法是在命令行「輸入」glibc 庫的名稱(如,libc.so.6),就像命令一樣執行。
輸出結果會顯示更多關於glibc庫的詳細信息,包括glibc的版本以及使用的GNU編譯器,也提供了glibc擴展的信息。glibc變數的位置取決於Linux版本和處理器架構。
在基於Debian的64位系統上:
$ /lib/x86_64-linux-gnu/libc.so.6
在基於Debian的32位系統上:
$ /lib/i386-linux-gnu/libc.so.6
在基於Red Hat的64位系統上:
$ /lib64/libc.so.6
在基於Red Hat的32位系統上:
$ /lib/libc.so.6

Ⅶ 如何安裝 glibc-2.15.tar

編譯步驟:
下載glibc-2.15.tar.gz和補丁包glibc-ports-2.15.tar.gz
解壓
$mv glibc-ports-2.15 glibc-2.15/ports
$mkdir glibc-build-2.15 &&cd glibc-build-2.15
$ ../glibc-2.15/configure \
--prefix=/usr/local/glibc_mips \
CC=mipsel-linux-gcc \
--host=mipsel-linux \
--build=i686-pc-linux-gnu \
--enable-add-on=nptl \
libc_cv_forced_unwind=yes \
libc_cv_c_cleanup=yes \
libc_cv_mips_tls=yes \
libc_cv_gnu99_inline=yes
ok,沒問題
$make &&make install
大功告成

##########################################################################

下面是我編譯時的過程和遇到的問題及解決:
##########################################################################

$tar xvf glibc-2.16.0.tar.bz2
$cd glibc-2.16.0
$./configure --prefix=/usr/local/glibc //先不加其他選項,除了安裝路徑,一切默認,網上一般配置arm的選項如下 --prefix=$HOME/usr/arm --with-headers=$HOME/usr/arm/glibc/arm-linux-glibc/include --with-libs=$HOME/usr/arm/glibc/arm-linux-glibc/lib
報錯:
configure: error: you must configure in a separate build directory

很奇怪的問題,必須配置一個構建目錄,剛開始以為是安裝目錄為創建
$mkdir /usr/local/glibc
問題仍然存在,網路之
$mkdir ../glibc-build && cd ../glibc-build
$../glibc-2.16.0/configure --prefix=/usr/local/glibc
出現新的問題:
configure: WARNING:
*** These auxiliary programs are missing or incompatible versions: msgfmt
*** some features will be disabled.
*** Check the INSTALL file for required versions.
checking LD_LIBRARY_PATH variable... contains current directory
configure: error:
*** LD_LIBRARY_PATH shouldn't contain the current directory when
*** building glibc. Please change the environment variable
*** and run configure again.
第一個警告不用管它,第二個LD_LIBRARY_PATY也會有錯?我的這個路徑用了多少天了。仔細看提示,不應包含當前路徑。打開~/.bash_profile
$cat ~/.bash_profile
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib export LD_LIBRARY_PATH

這也沒當前路徑啊。還是網路吧。
一個兄弟的解釋是這樣「LD_LIBRARY_PATH不能以終結符作為開始和最後一個字元,不能有2個終結符連在一起,我的LD_LIBRARY_PATH為 :/usr/local/firefox:/usr/local/firefox,只要在前面加上一個路徑,不讓:出現在第一個字元就可以了 」
原來如此,第一個字元不能是":",修改~/.bash_profile
export LD_LIBRARY_PATH=/usr/local/lib export LD_LIBRARY_PATH

$../glibc-2.16.0/configure --prefix=/usr/local/glibc
ls一下,發現,當前目錄生成了Makefile等一堆東西
$make && make install
沒問題
下一步開始交叉編譯
$mkdir ../glibc-build-mips && cd ../glibc-build-mips
$ ../glibc-2.16.0/configure --prefix=/usr/local/glibc_mips CC=mipsel-linux-gcc --host=mips
出現新的問題:
configure: running configure fragment for add-on libidn
configure: running configure fragment for add-on nptl
*** The GNU C library is currently not available for this platform.
*** So far nobody cared to port it and if there is no volunteer it
*** might never happen. So, if you have interest to see glibc on
*** this platform visit
*** http://www.gnu.org/software/libc/porting.html
*** and join the group of porters
看起來像是需要path,下載glibc-ports-2.16.tar.gz,放在源碼包目錄,解壓
$ ../glibc-2.16.0/configure \
--prefix=/usr/local/glibc_mips \
CC=mipsel-linux-gcc \
CXX=mipsel-linux-g++ \
--host=mips \
--enable-add-ons=/home/hb/code/glibc/glibc-ports-2.16.0/sysdeps/mips
仍然報錯:
configure: error: fragment must set $libc_add_on_canonical
改為:
$ ../glibc-2.16.0/configure \
--prefix=/usr/local/glibc_mips \
CC=mipsel-linux-gcc \
CXX=mipsel-linux-g++ \
--host=mips \
--enable-add-ons
報錯:
configure: error: The mipsel is not supported.
這樣不行,谷歌半天,總算知道補丁怎麼用的了。把補丁目錄拷到glibc目錄下,改名為ports
$mv glibc-ports-2.16.0/ glibc-2.16.0/ports

$../glibc-2.16.0/configure \
--prefix=/usr/local/glibc_mips \
CC=mipsel-linux-gcc \
CXX=mipsel-linux-g++ \
--host=mipsel-linux \
--build=i686-pc-linux-gnu \
--enable-add-on
繼續報錯:
configure: error:
*** These critical programs are missing or too old: ld as
*** Check the INSTALL file for required versions.
這個問題可折騰死我了。弄了好半天,就是不行,最後google發現,原來是ld和as版本不對,不是太高就是太低。
configure中找到$AS --version
發現版本是這么匹配的2.1*.*
$mipsel-linux-ld
GNU ld (GNU Binutils) 2.18.50.20080908
原來是這樣,在configure版本號那一行修改,最後的括弧前面加入
|2.18.50.×
as那一行也同樣修改
然後
$make
開始編譯,看起來不錯
好半天後,編譯也報錯了

In file included from ../include/uchar.h:1,
from mbrtoc16.c:23:
../wcsmbs/uchar.h:47:5: error: #error "<uchar.h> requires ISO C11 mode"
In file included from ../include/uchar.h:1,
from mbrtoc16.c:23:
../wcsmbs/uchar.h:52: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'char16_t'
../wcsmbs/uchar.h:53: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'char32_t'
../wcsmbs/uchar.h:61: error: expected ')' before '*' token
../wcsmbs/uchar.h:66: error: expected declaration specifiers or '...' before 'char16_t'
../wcsmbs/uchar.h:73: error: expected ')' before '*' token
../wcsmbs/uchar.h:78: error: expected declaration specifiers or '...' before 'char32_t'
mbrtoc16.c:37: error: expected ')' before '*' token
make[2]: *** [/home/hb/code/glibc/glibc-build-mips/wcsmbs/mbrtoc16.o] 錯誤 1
make[2]:正在離開目錄 `/home/hb/code/glibc/glibc-2.16.0/wcsmbs'
make[1]: *** [wcsmbs/subdir_lib] 錯誤 2
make[1]:正在離開目錄 `/home/hb/code/glibc/glibc-2.16.0'
make: *** [all] 錯誤 2
看看這個頭文件咋回事
$ vim ../glibc-2.16.0/wcsmbs/uchar.h
#if defined __GNUC__ && !defined __USE_ISOCXX11
/* Define the 16-bit and 32-bit character types. Use the information
provided by the compiler. */
# if !defined __CHAR16_TYPE__ || !defined __CHAR32_TYPE__
# if defined __STDC_VERSION__ && __STDC_VERSION__ < 201000L
# error "<uchar.h> requires ISO C11 mode"
# else
# error "definitions of __CHAR16_TYPE__ and/or __CHAR32_TYPE__ missing"
# endif

# endif

明白了,原來是需要c11支持,mipsel-linux-gcc -v一下,我的支持c99.原來如此。暫時沒招了,我還做不到修改c11的支持,只剩兩個辦法,不用這個glibc版本或者重新編譯一個支持c11的交叉編譯器。編譯器需要做的比較多,暫時先換個低點的版本吧。
下載galibc-2.15版本
重復上面步驟,解壓tar包
解壓ports包
$mv glibc-ports-2.15 glibc-2.15/ports
$mkdir glibc-build-2.15 &&cd glibc-build-2.15
$ ../glibc-2.15/configure \
--prefix=/usr/local/glibc_mips \
CC=mipsel-linux-gcc \
--host=mipsel-linux \
--build=i686-pc-linux-gnu \
--enable-add-on=nptl \
libc_cv_forced_unwind=yes \
libc_cv_c_cleanup=yes \
libc_cv_mips_tls=yes \
libc_cv_gnu99_inline=yes
ok,沒問題
$make &&make install
庫已經編好了,但是不能直接使用,必須再用新的庫重編一遍編譯器才行。

上一篇

Ⅷ 安裝glibc時遇到Error: undefined symbol `.LCFI1' in operation

你用谷歌搜索一下上述錯誤信息 Error: undefined symbol `.LCFI1' in operation 試試看?

返回的第一條結果是 Bug 33864 - gcc 4.3 svn fails to compile glibc 2.7's crti.o
(GNU GCC 網站上的 Bugzilla)。答復如下:

bero 2007-10-22 21:59:52 UTCThe problem goes away by not using the -fasynchronous-unwind-tables compiler
flag.

That seems to point at a gcc bug because the code and/or ld shouldn't care, but
I might be wrong - I haven't had enough time to really figure out gcc
internals.

Comment 4
Joseph S. Myers 2010-05-22 17:38:07 UTC

Not a GCC bug; glibc is manipulating .s output from GCC in ways that
aren't expected to work with all possible options. FWIW, EGLIBC has a fix
to allow it to build for x86 when unwind tables are enabled by default:

2009-06-25 Kazu Hirata <[email protected]>

* sysdeps/i386/Makefile (CFLAGS-initfini.s): Add
-fno-asynchronous-unwind-tables and -fno-unwind-tables.
(CFLAGS-pt-initfini.s): New.

還有其他網站有一些討論,你找找看?

Ⅸ glibc安裝錯誤error: you must configure in a separate build directory

要新建一個目錄,進入到該目錄,使用絕對路徑編譯安裝。
新建一個目錄,然後進入該目錄,用絕對路徑編譯。
mkdir /usr/local/glibc
cd /usr/local/glibc
/usr/local/src/glibc-2.7/configure
make && make install

Ⅹ linux編譯安裝glibc-2.17

這個其實應該找一個舊版本的ntfs-3g,版本太新
另外,不要隨便編譯安裝glibc,如果你新編譯的glibc覆蓋了系統中的,不能保證你的系統還能正常使用

熱點內容
超父演算法 發布:2025-02-10 08:43:05 瀏覽:910
電腦主機配置需要哪些硬體 發布:2025-02-10 08:22:52 瀏覽:706
平板太卡換存儲卡有用嗎 發布:2025-02-10 08:14:16 瀏覽:828
台北伺服器搭建 發布:2025-02-10 08:13:33 瀏覽:273
webconfig資料庫的連接配置 發布:2025-02-10 08:13:24 瀏覽:967
dell伺服器背板什麼意思 發布:2025-02-10 08:11:08 瀏覽:100
桑塔納全秀和半袖哪個配置高 發布:2025-02-10 07:55:42 瀏覽:350
手紋演算法 發布:2025-02-10 07:52:27 瀏覽:39
愛奇藝怎麼看賬號密碼 發布:2025-02-10 07:51:43 瀏覽:352
破解訪問許可權 發布:2025-02-10 07:17:24 瀏覽:664