忍者ブログ

まだ無題

blog no name still

08/21

Fri

2026

×

[PR]上記の広告は3ヶ月以上新規記事投稿のないブログに表示されています。新しい記事を書く事で広告が消えます。

03/20

Fri

2009

Fedora10でfirefox2を動かす

相変わらずscrubytのサンプルが動かない。
firewitireとfirefoxの関係化と思い、firefoxを2に
してみた。(Fedora10では標準でfirefox3が入っている。)


[環境]
VMware Server 2.0.0
Fedora 10

①firefox2.tar.gzを解凍し実行をこころみる。
 →失敗

[root@VMware1 Server]# /tmp/firefox/firefox
/tmp/firefox/firefox-bin: error while loading shared libraries: libstdc++.so.5: cannot open shared object file: No such file or directory

②/usr/lib/libstdc++.so.6はあるので、/usr/lib/libstdc++.so.5から/usr/lib/libstdc++.so.6へリンク
を張って再度実行を試みる
 →失敗。

[root@VMware1 Server]# /tmp/firefox/firefox
/tmp/firefox/firefox-bin: /usr/lib/libstdc++.so.5: version `GLIBCPP_3.2' not found (required by /tmp/firefox/firefox-bin)
/tmp/firefox/firefox-bin: /usr/lib/libstdc++.so.5: version `CXXABI_1.2' not found (required by /tmp/firefox/firefox-bin)
/tmp/firefox/firefox-bin: /usr/lib/libstdc++.so.5: version `GLIBCPP_3.2' not found (required by /tmp/firefox/libxpcom_core.so)
/tmp/firefox/firefox-bin: /usr/lib/libstdc++.so.5: version `CXXABI_1.2' not found (required by /tmp/firefox/libxpcom_core.so)
/tmp/firefox/firefox-bin: /usr/lib/libstdc++.so.5: version `GLIBCPP_3.2' not found (required by /tmp/firefox/libxpcom_compat.so)

 

③FedoraJP 掲示板(今日現在なぜか閲覧できない状態なのでgoogleのキャッシュ)に同様の書き込み
があったので、libstdc++.co.5のインストールを試みる。

・インストール
[root@VMware1 Server]# yum install compat-libstdc++-33

・libstdc++.so.5が入った。
[root@VMware1 Server]# ls -l /usr/lib/libstdc++.so.
libstdc++.so.5       libstdc++.so.6      
libstdc++.so.5.0.7   libstdc++.so.6.0.10 
[root@VMware1 Server]# ls -l /usr/lib/libstdc++.so.5
lrwxrwxrwx 1 root root 18 2009-03-15 08:03 /usr/lib/libstdc++.so.5 -> libstdc++.so.5.0.7

④山ほど警告(?)がでてるけど、firefox2起動!
[root@VMware1 Server]# /tmp/firefox/firefox
Loading socket Config module ...
Creating backend ...
Loading x11 FrontEnd module ...
Failed to load x11 FrontEnd module.
Loading simple Config module ...
Creating backend ...
desc table has been created.
Loading socket FrontEnd module ...
Starting SCIM as daemon ...
desc table has been created.
Failed to open the panel socket
GConf エラー: 設定サーバ (gconfd) との接続に失敗しました: いくつか発生する可能性として、ORBit の TCP/IP ネットワークを有効にしていない、あるいはお使いのシステムで古い NFS のロックがクラッシュを引き起こしたことが考えられます。これに関連する情報については
http://www.gnome.org/projects/gconf/ を参照して下さい (詳細 -  1: セッションへの接続に失敗しました: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.)
GConf エラー: 設定サーバ (gconfd) との接続に失敗しました: いくつか発生する可能性として、ORBit の TCP/IP ネットワークを有効にしていない、あるいはお使いのシステムで古い NFS のロックがクラッシュを引き起こしたことが考えられます。これに関連する情報については
http://www.gnome.org/projects/gconf/ を参照して下さい (詳細 -  1: セッションへの接続に失敗しました: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.)
Loading socket Config module ...
Creating backend ...
Loading x11 FrontEnd module ...
Failed to load x11 FrontEnd module.
Loading simple Config module ...
Creating backend ...
desc table has been created.
Loading socket FrontEnd module ...
Starting SCIM as daemon ...
desc table has been created.
GConf エラー: 設定サーバ (gconfd) との接続に失敗しました: いくつか発生する可能性として、ORBit の TCP/IP ネットワークを有効にしていない、あるいはお使いのシステムで古い NFS のロックがクラッシュを引き起こしたことが考えられます。これに関連する情報については
http://www.gnome.org/projects/gconf/ を参照して下さい (詳細 -  1: セッションへの接続に失敗しました: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.)
GConf エラー: 設定サーバ (gconfd) との接続に失敗しました: いくつか発生する可能性として、ORBit の TCP/IP ネットワークを有効にしていない、あるいはお使いのシステムで古い NFS のロックがクラッシュを引き起こしたことが考えられます。これに関連する情報については
http://www.gnome.org/projects/gconf/ を参照して下さい (詳細 -  1: セッションへの接続に失敗しました: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.)

⑤/usr/lib/firefox(firefox3起動)をリネームし、/usr/lib/firefox から 2の方が起動する
ようにシンボリックリンクを張る。
 →firefox 標準で2が動くようになった。

相変わらずscrubytのサンプルはうごかんなー。んー。

 

 

 

PR

03/12

Thu

2009

シェルで外部コマンドを呼び出してエラーの場合、終了するようにする

外部モジュール(php)を呼び出して処理するシェルスクリプトを書いてcronに設定している。

phpがエラー終了してもシェルは次の処理に進んでしまっていたので修正
 



`/usr/local/bin/php module.php xxxx`
if [ $? -ne 0 ]; then
   exit 1
fi


とする。

if [ ]の中に`/usr/local/bin/php module.php xxxx`を入れると $? に入るものを直接とれるのだろうか。。。
やってみたら、できた。
つまり、こう。


 

if [ `/usr/local/bin/php module.php xxxx` -ne 0 ]; then
   exit 1
fi



なるほどですね~。

03/08

Sun

2009

scrubytの導入に引き続き苦戦。
scrubytのホームにあるサンプルを動かそうとしてもうまくいかない。
バージョンを変えてみたがだめ。依存性は問題なさそうなんだが・・・。

下記のエラーを見ても皆目検討つかず。ライブラリ内が原因のように見えるが。。。


[root@VMware1 cgi-test]# ./ebay.rb
/usr/lib/ruby/gems/1.8/gems/scrubyt-0.4.06/lib/scrubyt/core/navigation/agents/mechanize.rb:178:in `fill_textfield': undefined method `[]=' for nil:NilClass (NoMethodError)
 from /usr/lib/ruby/gems/1.8/gems/scrubyt-0.4.06/lib/scrubyt/core/navigation/navigation_actions.rb:27:in `eval'
 from /usr/lib/ruby/gems/1.8/gems/scrubyt-0.4.06/lib/scrubyt/core/navigation/agents/mechanize.rb:178:in `fill_textfield'
 from /usr/lib/ruby/gems/1.8/gems/scrubyt-0.4.06/lib/scrubyt/core/navigation/navigation_actions.rb:27:in `fill_textfield'
 from ./ebay.rb:9
 from /usr/lib/ruby/gems/1.8/gems/scrubyt-0.4.06/lib/scrubyt/core/shared/extractor.rb:75:in `instance_eval'
 from /usr/lib/ruby/gems/1.8/gems/scrubyt-0.4.06/lib/scrubyt/core/shared/extractor.rb:75:in `initialize'
 from /usr/lib/ruby/gems/1.8/gems/scrubyt-0.4.06/lib/scrubyt/core/shared/extractor.rb:32:in `new'
 from /usr/lib/ruby/gems/1.8/gems/scrubyt-0.4.06/lib/scrubyt/core/shared/extractor.rb:32:in `define'
 from ./ebay.rb:6

VMっていうのは関係ないだろうし、
scrubytあきらめようか。。。

03/02

Mon

2009

 「スクライピング」というのを知らなかったので調べてみた。
ライブラリもいろいろでいてる。rubyのscrubytというのを使おうと思ったが結構難関が多い。。。

①install→失敗
[root@VMware1 Server]# gem install --remote scrubyt
Building native extensions.  This could take a while...
ERROR:  Error installing scrubyt:
 ERROR: Failed to build gem native extension.

/usr/bin/ruby extconf.rb install --remote scrubyt
can't find header files for ruby.

Gem files will remain installed in /usr/lib/ruby/gems/1.8/gems/hpricot-0.6.164 for inspection.
Results logged to /usr/lib/ruby/gems/1.8/gems/hpricot-0.6.164/ext/hpricot_scan/gem_make.out

→buildに必要なheaderファイルはruby-develをインストールすると入るらしい。

②ruby-develインストール
 

③scrubyt 再度インストール
[root@VMware1 Server]# gem install --remote scrubyt
Building native extensions.  This could take a while...
Building native extensions.  This could take a while...
Successfully installed hpricot-0.6.164
Successfully installed nokogiri-1.2.1
Successfully installed mechanize-0.9.1
Successfully installed scrubyt-0.4.06
4 gems installed
Installing ri documentation for hpricot-0.6.164...
Installing ri documentation for nokogiri-1.2.1...
Installing ri documentation for mechanize-0.9.1...
Installing ri documentation for scrubyt-0.4.06...
Installing RDoc documentation for hpricot-0.6.164...
Installing RDoc documentation for nokogiri-1.2.1...
Installing RDoc documentation for mechanize-0.9.1...
Installing RDoc documentation for scrubyt-0.4.06...

→正常に終わった模様。

④確認
[root@VMware1 Server]# gem search

*** LOCAL GEMS ***

hpricot (0.6.164)
mechanize (0.9.1)
nokogiri (1.2.1)
scrubyt (0.4.06) ←入ってます。


 だがまだ実際に動かせてはいない。。。。

01/24

Sat

2009

外部からソケットサーバの起動

動的なサイトをhtmlだけのサイトにするwebアプリを作成中。
入力画面はレンタルサーバにつくるつもりだけど、処理部分はレンタルサーバだと途中が処理できられてしまうので自宅webサーバに処理をなげる。

その際に無駄にソケット通信を使うように試みていた。
ソケットサーバははじめ起動せずに、①レンタルサーバからの要求により起動、②対象のurlを受けて処理、③停止命令を受けてソケットサーバ停止 という流れを考えていたが、cgiをたたいて外部からソケットサーバを起動することはできない模様(!)

自宅サーバにログインして同じcgiをたたくと正常に起動するので、phpのソケットサーバ(cgiはphp)で起動元の確認とかしているのかな。。。。面倒なので、ローカルでずっと起動しておくことにしよう。

カレンダー

07 2026/08 09
S M T W T F S
1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31

フリーエリア

最新CM

最新TB

プロフィール

HN:
No Name Ninja
性別:
非公開

バーコード

ブログ内検索

アクセス解析

Copyright © まだ無題 : All rights reserved

TemplateDesign by KARMA7

忍者ブログ [PR]