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

9.18.2013

Can't install RMagick 2.13.1. Can't find MagickWand.h.

gem で rmagick をインストールしようとした際に以下のエラーが出た.
# gem install rmagick
...
Can't install RMagick 2.13.1. Can't find MagickWand.h.
...
このとき,システム内に MagickWand.h は存在しなかった.


色々なパッケージを入れてみたのでどれが根本原因かわからなかったが,恐らく以下が正解だったようだ.
これを入れたら /usr/include/ImageMagick/wand/MagickWand.h が作成され rmagick のインストールが正常に完了した.
# apt-get install libmagick++-dev
I got the below error during install "rmagick".
# gem install rmagick
...
Can't install RMagick 2.13.1. Can't find MagickWand.h.
...
And, there was no MagickWand.h in my system.


When I installed the below package, the file was created in /usr/include/ImageMagick/wand/MagickWand.h and installing "rmagick" was correctly completed.
# apt-get install libmagick++-dev

4.08.2011

Ubuntu で日本語ロケールにした際に,日本語になったディレクトリ名を英語に戻す

久々に Ubuntu をクリーンインストールして,何も考えずに日本語ロケールを選んだら
ホームディレクトリ下の各種ディレクトリが日本語になってしまってちょっと困った.
(ex. /home/hoge/デスクトップ/)
ディレクトリ移るのにいちいち IME 起動したりとかナンセンスなので英語に戻した.
ターミナルで以下のコマンドを実行すると,ディレクトリ名を英語に戻して良いか聞かれるので肯定すれば英語に置き換わる.

$ LANG=C xdg-user-dirs-gtk-update

4.07.2011

Make CapsLock into an Additional Ctrl in Ubuntu-10.10

  1. [System] -> [Preference] -> [Keyboard]
  2. [Layout]Tab -> [Option] -> [Ctrl key position]
  3. Check "Make CapsLock an additional Ctrl"

Ubuntu 10.10 で要らない子 CapsLock キーを Ctrl キーに変更する方法のメモ。
  1. [システム] -> [設定] -> [キーボード]
  2. [レイアウト]タブ -> [オプション] -> [Ctrlキーの位置]
  3. "Make CapsLock an additional Ctrl" を選択
※日本語版使ってないので,最後の選択肢の文言は違うかも知れません.
書いてある内容を読んで適宜判断して下さい.

10.13.2010

Dual-boot of Windows with Linux on Sony VAIO typeS

Abstraction of the method; closed/opened squares mean used/free blocks on the disk space.
This post describes how to install Linux into Windows PC without removing or reinstalling the existing Windows.



Please use this information at your own risk.
This method may break your system or important data.




Environment of My Case
  • Sony VAIO typeS (VGN-S94PS)
    • OS: Windows XP Professional
    • CPU: PentiumM 2 GHz
    • RAM: 1GB
    • HDD: 60GB
      • Recovery partition: for recoverying Windows
      • System partition: for system and user data
  • Additional OS: Ubuntu


Method 
  1. Download ISO image of Ubuntu from its web site and burn it onto an optical disk. (Of course you can use other bootable devices.)
    http://www.ubuntu.com/desktop/get-ubuntu/download
  2. Defrag the system partition to protect the Windows data from following repartitioning. I'm not sure, however, this method is enough to protect your data. I strongly recommend you to copy your whole data for backup.
  3. Boot Ubuntu from the optical disk onto which you burn its ISO image.
  4. Repartition the system partition with gparted which the ISO image contains. You have to ensure an enough sized partition for Windows because this operation may drop necessary data.
    Format the data partition as fat32 because both of Windows XP and Ubuntu can use the format.
    /dev/sda1 ntfs recovery partition (by default)
    /dev/sda2 ntfs for Windows XP
    /dev/sda5 ext3 /
    /dev/sda6 ext3 swap
    /dev/sda4 fat32 data partition for Windows and Ubuntu
    
    /dev/sda1 was not touched. /dev/sda2 was shrinked to make space for /dev/sda4, /dev/sda5 and /dev/sda6. /dev/sda5 and /dev/sda6 are for Ubuntu, and /dev/sda4 is for user data which both of Windows and Ubuntu access.
  5. Mount the data partition and write out a bootsector image there.
    $ sudo mkdir /winD
    $ sudo mount -t vfat /dev/sda4 /winD
    $ sudo dd if=/dev/sda5 of=/winD/bootsector.img bs=512 count=1
    
    I gave the mount point the name of /winD because Windows treats the partition as D-drive.
  6. Remove the optical disk (or other boot devices) and reboot.
  7. Move bootsector.img from D-drive to root of C-drive (C:\bootsector.img).
  8. Modify C:\boot.ini as below.
    [boot loader]
    timeout=30
    default=multi(0)disk(0)rdisk(0)partition(2)\WINDOWS
    [operating systems]
    multi(0)disk(0)rdisk(0)partition(2)\WINDOWS="Microsoft Windows XP Professional" /noexecute=optin /fastdetect
    C:\bootsector.img="Ubuntu"
    
  9. Reboot to confirm that you can select OS.
    If you can not find the display to select OS, you may fail to modify boot.ini. Check the file. Or, if Ubuntu does not boot after you select it, you may fail to create or move bootsector.img. Check the file or recreate it. (You need the optical disk or bootable devices again.)

10.08.2010

** ERROR ** Could not find encoding file "H".

Cygwin 上の日本語 LaTeX 環境で
** ERROR ** Could not find encoding file "H".
というエラーが出たときの対処についてのメモです.
おそらく Linux でも同様に対応可能だと思います.


状況
tex -> dvi -> pdf と生成するために platex, dvipdfmx を使って以下のようにしているのですが,
別件で ghostscript をアップデートしてから dvipdfmx 実行中に前述のエラーが出るようになりました.
% platex hoge.tex
% dvipdfmx hoge


対処
どうやら有名なエラーらしく,フォントの読み込みに失敗している模様.
ghostscript のアップデートにより,フォント関係のパスが変わったことが原因のようでした.
結論としては以下のコマンドで正常に動作するようになりました.
% ln -s /usr/share/ghostscript/8.50/Resource/ /usr/local/teTeX/share/texmf/dvipdfm/
% mktexlsr
このときフォントの位置は ghostscript のバージョンやインストール先によって異なります.また,リンクを配置すべき位置も tex をどこにインストールしたかによって異なりますが, mktexlsr 実行時に出力されるディレクトリがヒントになると思います.
当方の環境では以下のようになっていました.
% mktexlsr
mktexlsr: Updating /usr/local/teTeX/share/texmf/ls-R...
mktexlsr: Updating /usr/local/teTeX/share/texmf-config/ls-R...
mktexlsr: Updating /usr/local/teTeX/share/texmf-dist/ls-R...
mktexlsr: Updating /usr/local/teTeX/share/texmf-var/ls-R...
mktexlsr: Done.

以下の位置にシンボリックリンクを張っている例を多数見かけたので,そのまま同じようにしてまったく問題解決できなくてハマっていました.フォントへのリンクを張り直したのにうまくいかない方はリンクを置く位置をよく確認してみてください.
/usr/share/texmf/dvipdfm/