ラベル libedit の投稿を表示しています。 すべての投稿を表示
ラベル libedit の投稿を表示しています。 すべての投稿を表示

2008年11月15日土曜日

libedit.2.dylib 入れ直した

そのいち
そのに
そのさん
と、libedit2.dylib いかれてると思ってたけど、
ぐぐってみたところ、ど〜も知らぬ間にオリジナルの libedit.2.dylib を上書きしてしまっていた模様。。

さて、どうやって元に戻そうか、、、と思って試みたのが以下

・MacPorts で libedit いれて symlink
苦し紛れにこれやればなおるんじゃね?
と思って入れて symlink 張ってみたものの、、バージョンが違うぞと叱られた

% ftp
dyld: Library not loaded: /usr/lib/libedit.2.dylib
Referenced from: /usr/bin/ftp
Reason: Incompatible library version: ftp requires version 2.0.0 or later, but libedit.2.dylib provides version 1.0.0
zsh: trace trap ftp

2.11 なんだけどなー。なんか違うの?
% port installed libedit
The following ports are currently installed:
libedit @20080712-2.11_0 (active)

諦めて、次。

・Darwin Source Code の libedit 入れる
あ、そういやソース公開されてるじゃないか、と思い出し(おそい
Apple のサイトへ。
Apple - Mac OS X 10.5.5 (Darwin 9.5)

お目当てのものはこれ
libedit-11.tar.gz

手順は、、適当
0. tarball ゲット
1. libedit-11.tar.gz を展開 & cd
2. make
3. make install
4. Debug ディレクトリがなくてエラーになるので mkdir /tmp/libedit/Debug
5. また make install
6. /tmp/libedit/Release/usr/lib 以下に欲しいものができてるので
sudo install -m 755 /tmp/libedit/Release/usr/lib/libedit.2.dylib /usr/lib

そして、、、

% /usr/bin/python
Python 2.5.1 (r251:54863, Jan 17 2008, 19:35:17)
[GCC 4.0.1 (Apple Inc. build 5465)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> ^D
% /usr/bin/ftp
ftp> quit
% /usr/bin/bc
bc 1.06
Copyright 1991-1994, 1997, 1998, 2000 Free Software Foundation, Inc.
This is free software with ABSOLUTELY NO WARRANTY.
For details type `warranty'.
quit

無事直りましたとさ・・・

2008年11月8日土曜日

libedit.2.dylib にリンクしてるバイナリがおかしい(?)

libedit.2.dylib にリンクしてる、一部のコマンドがおかしい。

追記: libedit.2.dylib 入れ直して解決した

こんな具合

% bc
dyld: Symbol not found: _history
Referenced from: /usr/bin/bc
Expected in: /usr/lib/libedit.2.dylib

zsh: trace trap bc
% dscl
dyld: Symbol not found: _history
Referenced from: /usr/bin/dscl
Expected in: /usr/lib/libedit.2.dylib

zsh: trace trap dscl
% ftp
dyld: Symbol not found: _history
Referenced from: /usr/bin/ftp
Expected in: /usr/lib/libedit.2.dylib

zsh: trace trap ftp

sqlite3 や ntpq などは問題なし
% otool -L /usr/bin/sqlite3
/usr/bin/sqlite3:
/usr/lib/libsqlite3.0.dylib (compatibility version 9.0.0, current version 9.6.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 111.0.0)
/usr/lib/libedit.2.dylib (compatibility version 2.0.0, current version 2.9.0)
/usr/lib/libncurses.5.4.dylib (compatibility version 5.4.0, current version 5.4.0)
/usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current version 1.0.0)
% otool -L /usr/bin/ntpq
/usr/bin/ntpq:
/System/Library/Frameworks/IOKit.framework/Versions/A/IOKit (compatibility version 1.0.0, current version 275.0.0)
/usr/lib/libedit.2.dylib (compatibility version 2.0.0, current version 2.9.0)
/usr/lib/libcrypto.0.9.7.dylib (compatibility version 0.9.7, current version 0.9.7)
/usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current version 1.0.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 111.0.0)

% /usr/bin/sqlite3
SQLite version 3.4.0
Enter ".help" for instructions
sqlite> .quit
% /usr/bin/ntpq
ntpq> help
ntpq commands:
addvars debug lopeers passociations rl
associations delay lpassociations passwd rmvars
authenticate exit lpeers peers rv
cl help mreadlist poll showvars
clearvars host mreadvar pstatus timeout
clocklist hostnames mrl quit version
clockvar keyid mrv raw writelist
cooked keytype ntpversion readlist writevar
cv lassociations opeers readvar
ntpq> quit

2008年11月7日金曜日

python 以外もおかしい、、

python がおかしいんだけど、
どうも ftp コマンドもおかしい。

追記: libedit2.dylib 入れ直して解決した

ftp
% /usr/bin/ftp
dyld: Symbol not found: _history
Referenced from: /usr/bin/ftp
Expected in: /usr/lib/libedit.2.dylib

zsh: trace trap /usr/bin/ftp

えー、なんで Symbol not found になるの。。