Programing

RVMのアップデートで失敗するときの対処法

RVMのアップデートで、かなり古いバージョンからアップデートする時に、失敗するときがある。

$ rvm get latest
Original installed RVM version:
rvm 1.5.2 by Wayne E. Seguin (wayneeseg...@gmail.com) [http://
rvm.beginrescueend.com/]
rvm-<html>
  % Total    % Received % Xferd  Average Speed   Time    Time
Time  Current
                                 Dload  Upload   Total   Spent
Left  Speed
100   173    0   173    0     0    469      0 --:--:-- --:--:--
--:--:--  2246
ERROR:
.tar.gz downloaded does not match it's md5 checksum <html>
<head><title>400 Bad Request</title></head>
<body bgcolor="white">
<center><h1>400 Bad Request</h1></center>
<hr><center>nginx/0.8.54</center>
</body>
./html>
    Aborting RVM Installation.

こんな症状の対処法

$ bash < <(curl -s https://rvm.beginrescueend.com/install/rvm)

もしくは、

$ rvm get head
$ rvm reload

一度ターミナルを再接続後、

$ rvm get latest
$ rvm --version
rvm 1.8.5 by Wayne E. Seguin ([email protected]) [https://rvm.beginrescueend.com/]
By admin on 2011年10月5日 | Linux, Mac, Programing | A comment?
タグ: ,

Perlのバージョンを切り替えるPerlbrew

perlのバージョンを切り替えて使用できるperlbrewScientific Linux 6上にインストールしてみた。

通常は、最新のバージョンを使っていれば良いと思うが、OSによっては、古いバージョンがインストールされたり、ライブラリとの整合が合わなかったりして、最新のバージョンでは動作しない場合に、切り替えると良いでしょう。

curlとperlが既にインストールされてる事が条件です。

perlbrewのインストール

$ curl -k -L http://xrl.us/perlbrew > perlbrew
$ perl perlbrew install
$ rm perlbrew
$ ~/perl5/perlbrew/bin/perlbrew init
$ echo 'source ~/perl5/perlbrew/etc/bashrc' >> .bashrc
$ source .bashrc
$ perlbrew install perl-5.14.1
$ perl --version
$ This is perl, v5.8.8 built for x86_64-linux-thread-multi
$
$ perlbrew switch perl-5.14.1
$ perl --version
$ This is perl 5, version 14, subversion 1 (v5.14.1) built for x86_64-linux
By admin on 2011年10月4日 | Linux, Programing | A comment?
タグ: ,

JpGraphのphp設定

Jpgraphを使う際に、ライブラリのパスを設定する必要があるので、php.iniを編集。

jpgraphのインストール先は、/var/www/jpgraphとした場合、include_pathを設定します。

# vi /etc/php.ini
...
include_path = ".:/var/www/jpgraph"
...
...

保存後に、Apache再起動

By admin on 2011年9月29日 | Programing | A comment?
タグ: , ,