2008年8月15日 星期五

Ubuntu 下安裝Qt4

今天想裝個Qt4來玩玩,依照以前在Windows下裝的方法來裝卻發現make 的時候有error
後來又看到可以用Synaptic套件管理的方式來裝,裝好了卻又發現不能編譯,可能有一些套件我沒有抓到吧,最後看到有人談到用apt-get的方式安裝,發現這樣真是又快又不佔空間

$ sudo apt-get install libqt4-dev libqt4-debug libqt4-gui libqt4-sql qt4-dev-tools qt4-doc qt4-designer qt4-qtconfig

這樣就可以了,大概只需要10分鐘不到的時間吧,之前在Windows下大概搞了快四小時吧@@

趕快抓Qt4裏面的tutorial來編譯看看.

#include
#include
int main(int argc, char *argv[])
{
QApplication app(argc, argv);
QPushButton hello("Hello world!");
hello.show();
return app.exec();
}

然後依序執行以下指令,Makefile會自動產生

$ qmake -project
$ qmake
$ make

執行檔就跑出來囉

2008年8月10日 星期日

解決ssh連線時 unprotected private key file 問題

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ WARNING: UNPROTECTED PRIVATE KEY FILE! @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
Permissions 0755 for private key file are too open.
It is recommended that your private key files are NOT accessible by others.
This private key will be ignored.

Just execute this and I solved my problem.

chmod 0600 [private key file]




The reason of this issue might be the file property. Just change to 600 would probably solve this issue. Remember to add sudo if you are not root to your machine.


這是我ssh連線時遇到的問題,原因是我把private key跟public key搬來搬去
檔案性質可能有被改到吧, I'm not sure for that.
anyway,就修改回來吧
"chmod 0600 [private key file]"
就可以了