linux error &solution

gcc -o test test.c -lmysqlclient

http://developer.51cto.com/art/200609/32317.htm  (about gcc)

1、E: Could not get lock /var/lib/dpkg/lock - open (11: Resource temporarily unavailable)
E: Unable to lock the administration directory (/var/lib/dpkg/), is another process using it?   :

http://hi.baidu.com/remoteexp/item/9a49be38da33155d81f1a7b7(

sudo rm /var/cache/apt/archives/lock
sudo rm /var/lib/dpkg/lock

2、.cpp  .h      how to make file       :

例:main.cpp  get.cpp  head.h

makefile 内容如下 :

main: main.o get.o

  g++ -o main main.o get.o

mainget.o:main.cpp get.cpp

  g++ -c main.cpp get.cpp

clean:

  rm  -f main main.o get.o

命令行里输入:make

make main

make clean

 

3、one process(called language support ) don't move on and  can't closed:

ps -aux|grep language                                                    (ps detect and control on process on linux)

Warning: bad ps syntax, perhaps a bogus '-'? See http://procps.sf.net/faq.html
xaf       3467  0.5  4.2 177824 87020 ?        Sl   11:06   0:18 /usr/bin/python /usr/bin/gnome-language-selector
xaf       4227  0.0  0.0   4368   836 pts/3    S+   12:03   0:00 grep --color=auto language

kill  3467

posted @ 2013-11-29 12:25  xaf_dfg  阅读(249)  评论(0编辑  收藏  举报