Skip to main content

Posts

Showing posts with the label Linux

Install couchdb for lisp on Debian

// every time you meet PGP signature, skip the checking // other wise, try to accept the condition, treat it like it is successfully installed (for the example*.lisp, which sounds reasonable to skip) // I install the package in the system-wide directory // install debian package: couchdb, lisp package: clouchdb, cl-couchdb sudo apt-get install cl-asdf sudo apt-get install couchdb sudo apt-get install erlang (not sure if it is needed) sudo sbcl (require ‘asdf) (require ‘asdf-install) (asdf-install:install ‘cl-couchdb) error: cl-couchdb-test component missing sudo apt-get install cl-cclan (not sure if it is needed) (asdf-install:install ‘cl-couchdb) (asdf-install:install ‘clouchdb) debugger invoked on a SB-INT:STREAM-DECODING-ERROR in thread #<THREAD “initial thread” RUNNING {1002CA6DD1}>: decoding error on stream #<SB-SYS:FD-STREAM for “file /usr/lib/sbcl/site/clouchdb_0.0.11/examples.lisp” {1005FE5DB1}> (:EXTERNAL-FORMAT :ASCII): the octet sequence (195) canno...

Setup xampp for mod_python

1. install flex (parser): sudo apt-get install flex 2. install xampp developer package 3. sudo  ./configure --with-apxs=/opt/lampp/bin/apxs if you get  "apxs:Error: Command failed with rc=65536..." => download the package: https://svn.apache.org/repos/asf/quetzalcoatl/mod_python/trunk 4. After "sudo make", "sudo make install" in http.conf, add following lines: LoadModule python_module modules/mod_python.so <Directory /some/directory/htdocs/test>     AddHandler mod_python .py     PythonHandler mptest     PythonDebug On </Directory> 5. Write test python script "mptest.py": from mod_python import apache def handler(req):     req.content_type = 'text/plain'     req.write("Hello World!")     return apache.OK

Install python-mysqldb with lampp on Ubuntu

I try to download python-mysqldb from " http://sourceforge.net/projects/mysql-python/" and run the build/install command: python setup.py build I receive this message: EnvironmentError: mysql_config not found I set mysql_config to "/opt/lampp/bin/mysql_config" (I use lampp) and encounter this error message: cc1: error: unrecognized command line option "-mpentiumpro" cc1: warning: command line option "-felide-constructors" is valid for C++/ObjC++ but not for C cc1: warning: command line option "-fno-rtti" is valid for C++/ObjC++ but not for C error: command 'gcc' failed with exit status 1 so I type sudo apt-get install python-mysqldb and find that I can finally import MySQLdb in python

screen command on linux

ctrl-a-c: create a new screen ctrl-a-n: switch to next screen ctrl-a-p: switch to previous screen ctrl-a-d: detach ctrl-a A: set title screen -ls: look up how many screens you open screen -r number(process_id?): switch to that screen

Procedure to install wordnet on Ubuntu (Linux)

// get tcl, tk before install wordnet sudo apt-get install tcl8.4-dev tk8.4-dev // in the WordNet-3.0 folder (Where your download and extract the package) // depends on where the above commend install tcl, tk ./configure --with-tk=/usr/share/tcltk/tk8.4 --with-tcl=/usr/share/tcltk/tcl8.4 make sudo make install // Now, wordnet will be in "/usr/local/WordNet-3.0"

Useful Linux Tools

beep-media-player :跟 xmms, winamp很像的音樂播放軟體 kompare : 圖形介面的 diff,可比較檔案 jdk,,jre : java vlc :好用的多媒體播放器,吃很多格式 audacity : 有點像 windows 下的 goldwave  ,聲音檔案的處理軟體 gvim :vim 的 GUI 版,文字編輯器 chewing(scim-chewing)  : 新酷音輸入法 d4x : download manager ,有點像 flashget dftp: ftp client,ftp 檔案傳輸,像 filezilla kalarm: scheduler with alarm pop-up : 鬧鐘,定時提醒 unrar:  解 rar 壓縮檔

Linux Command

cat your_file_path : print (read) file (顯示,閱讀文字檔案) pppoeconf : configure ADSL connection (設定 ADSL 連線) updatedb: build the index of whole system (建立索引) locate keyword: locate the index builded by updatedb (搜尋檔案) ps2pdf: convert ps to pdf (把 ps 轉換成 pdf 檔案) sudo apt-get update: update the source list sudo apt-get install wanted_package: install the package (安裝軟體) sudo apt-get upgrade: upgrade the system apt-cache showpkg: show basic information of the package, like version, dependency...