Showing posts with label Linux. Show all posts
Showing posts with label Linux. Show all posts

Tuesday, April 7, 2009

Boot loader on Ubuntu

How to change the boot sequence if you have multi-OS on your PC?

  1. Open Synaptic Package Manager
  2. Search kgrubeditor, kg is enough. You will see kgrubeditor in your search result.
  3. Install it, then you can modify the default OS.

Or
  1. Open your terminal
  2. Type $ sudo apt-get install kgrubeditor
Or
  1. Open your terminal
  2. Type $ sudo gedit /boot/grub/menu.list
http://www.kde-apps.org/content/show.php?content=75442

Thursday, March 19, 2009

mkoctfile problem on Cygwin

I tired to use mkoctfile to compile hello.cc, the example of Octave and C/C++.

First, I got the error messages as follows,
==========================================================
$ mkoctfile hello.cc
/usr/lib/gcc/i686-pc-cygwin/4.3.2/../../../../i686-pc-cygwin/bin/ld: cannot find -loctave
collect2: ld returned 1 exit status
==========================================================
I found the solution from
Rename libctave.dll.a to liboctave.dll.a.

Then,
=========================================================
$ mkoctfile hello.cc
/usr/lib/gcc/i686-pc-cygwin/4.3.2/../../../../i686-pc-cygwin/bin/ld: cannot find -lreadline
collect2: ld returned 1 exit status
=========================================================
It seems to be I didn't have library readline.
I tried to install from Cygwin setup program,
libs/libreadline5 4.3-5 GNU readline and history libraries
libs/libreadline6 5.2.13-11 GNU readline and history libraries
But this doesn't solve my problem,
So I manually install the libraries,
Donwload packages,

And then, I got error messages as follows,
=========================================================
$ mkoctfile hello.cc
/usr/lib/gcc/i686-pc-cygwin/4.3.2/../../../../i686-pc-cygwin/bin/ld: cannot find -lgfortranbegin
collect2: ld returned 1 exit status
=========================================================
Go to Cygwin official site to search fortranbegin.
Then I have to install the package, devel/gcc4-fortran: Fortran subpackage.

Finally, I solved my problem ^^

mkoctfile in Ubuntu

We need octave3.0-header first.
$ sudo apt-get install octave3.0-header

After the accomplishment of download and installation,
you can use mkoctfile now.

Do followin the steps.
You can compile hello.cc successfully and run it helloworld (1,2,3)

Install Ocatve on Ubuntu

Update your apt-get first. 
  1. $ sudo apt-get update
  2. $ sudo apt-get install octave
Miss the first step, you may not find octave package when type step 2 command.
After updating, then input command of step 2.
Then system will ask you to agree the download process and upgrade process.
Press "y" and wait.

If you meet a problem, like 
ldconfig deferred processing tkaing place
dpkg: status database area is locked by another process
Just running step 2 again.

At least, I install it successfully.

Thursday, March 12, 2009

Friday, January 23, 2009

Uninstall Cygwin Entirely

I try to uninstall Cygwin for rebuilding Mono.
There are a lot of webpage talking about uninstall Cygwin.
Official instruction is best.

Friday, July 25, 2008

安裝htk 3.4在cygwin上

網路上的說明大多是英文的,提供個翻譯的中文版本給大家。
參考自http://www.phon.ucl.ac.uk/resource/sfs/howto/htk.htm
參考自http://www.llaisdy.com/blog/2007/07/30/compiling-htk-34-on-windows-xp/

使用 cygwin(1.5.25-14)安裝htk 3.4
前置作業
1. 啟動"cygwin_setup.exe,可以從Cygwin首頁下載或是http://cygwin.com/setup.exe
2. 選擇安裝方式。
  • 選擇 "Install from Internet",表示從網路下載套件並安裝,確認電腦的網路是OK的話,就選擇使方式。
  • 另外也可以只下載套件,選擇"Download from Internet"。
  • 或是選擇"Install from Local Directory",只進行安裝已經下載好的套件。
3. 選擇安裝目錄(資料夾),建議選擇預設的"C:/cygwin",除非你是高手,如果你是高手應該也不用看翻譯了吧。
4. 選擇下載後的套件要放在哪個資料夾,例如 "C:/download/cygwin",下次要離線安裝的話,就可以選擇此目錄。
5. 選擇網路連線方式,不需要更改,直接下一步。
6. 選擇下載的網站,當然選自己國家的網站,下載速度會比較快,以台灣為例,有這些可以選擇
  • 台灣大學 ftp://ftp.ntu.edu.tw
  • 元智大學 ftp://ftp.cse.yzu.edu.tw或http://ftp.cse.yzu.edu.tw
7. 選擇下載套件,因為要能夠使用htk,所以需要以下套件
  • 所有在"Base"的套件,如果在NEW的那一欄顯示skip就用滑鼠點選最新的版本來下載。
  • 在Devel分類的BINUTILS: The GNU assembler, linker and binary utilities,點選後,會自動也點選有相依性的套件。
  • 在Devel分類的GCC: C Compiler。
  • 在Devel分類的GCC-G++: GCC C++ compiler。
  • 在Devel分類的MAKE: the GNU version of the 'make' utility 。
8. 等待下載和安裝。
9. 安裝完畢後,可以選擇要在桌面放啟動捷徑或是在程式集顯示Cygwin資料夾。

接下來安裝HTK 3.4

1. 下載HTK原始碼,到http://htk.eng.cam.ac.uk/的Download區下載,下載前要先註冊。
2. 下載HTK source code (tar+gzip archive) 和 HTK samples (tar+gzip archive) ,放到C:\cygwin\home\User_name\資料夾。
3. 啟動cygwin,正常來講起始位置是C:\cygwin\home\User_name\下,沒錯的話輸入ls,會看到剛剛移動過來的HTK-3.4.tar.gz。
4. 解壓縮HTK-3.4.tar.gz,輸入tar xvfz HTK-3.4.tar.gz,完畢後輸入ls,會看到home\User_name\下多了一個htk資料夾。
5. 接下來要修改htk\HTKTools下的Makefile.in文件內容,可以直接在windows下修改或是使用cygwin的編輯器。
6. 打開htk\HTKTools下的Makefile.in,將裡面的某一段程式碼的"-lX11"刪除,如下。

%: %.c $(HTKLIB)
if [ ! -d $(bindir) -a X_ = X_yes ] ; then mkdir -p $(bindir) ; fi
if [ x$@ = xHSLab ] ; then
$(CC) -o $@ $(CFLAGS) $^ $(LDFLAGS) -lX11 ;
else
$(CC) -o $@ $(CFLAGS) $^ $(LDFLAGS) ; fi

變成,

%: %.c $(HTKLIB)
if [ ! -d $(bindir) -a X_ = X_yes ] ; then mkdir -p $(bindir) ; fi
if [ x$@ = xHSLab ] ; then
$(CC) -o $@ $(CFLAGS) $^ $(LDFLAGS) ;
else
$(CC) -o $@ $(CFLAGS) $^ $(LDFLAGS) ; fi

7. 複寫HGraf.c檔。在htk目錄下,輸入以下指令。

$ cd HTKLib \\進入HTKLib資料夾
$ cp HGraf.c HGraf.c.original \\將HGraf.c重新命名為HGraf.c.original
$ cp HGraf.null.c HGraf.c \\將HGraf.null.c重新命名為HGraf.c
$ cd ..\\回到htk資料夾

8. 接下來回到htk資料夾後,依照此目錄的README,依序輸入
$ ./configure
$ make
$ make install

9. 大功告成

如果是安裝3.3.以下的版本,請參考http://speech.ee.nthu.edu.tw/index.php?n=Lab.HtkCygwin

Thursday, November 8, 2007

SUSE LINUX 文字介面調整解析度

  1. 先 用 ctrl-alt-F1 切到 console
  2. 用 root 的帳號登入
  3. 執行 init 3 關掉 X window
  4. 執行 sax2 去測試一個你的螢幕能接受的解析度。(如果測試的時候調太高又變一片黑,等30秒就會還原。)
  5. 調好之後儲存,離開 sax2
  6. 再執行 init 5,重新開始 X window

參考此http://www.suse.idv.tw/viewtopic.php?p=2845

Clicky

Clicky Web Analytics