`
lzj0470
  • 浏览: 1249701 次
  • 性别: Icon_minigender_1
  • 来自: 深圳
社区版块
存档分类
最新评论

ubuntu 集合

阅读更多

1、ubuntu 下如何以root用户登录

1、先解除root锁定,为root用户设置密码
打开终端输入:sudo passwd

Password: <--- 输入你当前用户的密码

Enter new UNIX password: <--- 新的Root用户密码

Retype new UNIX password: <--- 重复新的Root用户密码

passwd:已成功更新密码

2、更改登陆,允许root登录
打开 系统>系统管理>登录窗口)

点“安全”选项页,选择“允许本地管理员登录”。

3、注销当前用户,以root登陆 

2、ubuntu控制台下切换到root用户的命令

sudo -s -H

3、需要一个有root权限的shell

运行 sudo -s

4、Ubuntu下编译mmseg-0.7.3出错的解决方法

css/UnigramCorpusReader.cpp: In member function 'virtual int css::UnigramCorpusReader::open(const char*, const char*)':
css/UnigramCorpusReader.cpp:89: error: 'strncmp' was not declared in this scope
make[2]: *** [UnigramCorpusReader.lo] 错误 1
make[2]:正在离开目录 `/home/qichunren/download/mmseg-0.7.3/src'
make[1]: *** [all-recursive] 错误 1
make[1]:正在离开目录 `/home/qichunren/download/mmseg-0.7.3'
make: *** [all] 错误 2

-----------------------------------------------
在Ubuntu下编译安装mmseg-0.7.3会出错,解决的方法是:
手工编辑.src/css目录下UnigramCorpusReader.cpp 文件,在其第一行加上
#include <string.h>
然后重新 make,即可通过

5、ubuntu下载

http://www.ubuntu.com/getubuntu/downloadmirrors

 

sudo apt-get install rcconf
sudo apt-get install flex

 

sudo apt-get install binutils cpp fetchmail flex gcc libarchive-zip-perl libc6-dev libcompress-zlib-perl libdb4.3-dev libpcre3 libpopt-dev lynx m4 make ncftp nmap perl perl-modules unzip zip zlib1g-dev autoconf automake1.9 libtool bison autotools-dev g++ build-essential
sudo apt-get install zlib1g-dev
sudo apt-get install libreadline5-dev
sudo apt-get install libxml2 libxml2-dev
sudo apt-get install bison-doc fontforge-doc potrace autotrace nas libgcrypt11-doc libglib2.0-doc gnutls-doc gnutls-bin krb5-doc libtool-doc libqt3-mt-psql libqt3-mt-mysql libqt3-mt-odbc libqt3-i18n qt3-doc libmyodbc odbc-postgresql libtool libqt3-compat-headers

 

deb http://Ubuntu.csie.ntu.edu.tw/ubuntu/ jaunty main restricted universe multiverse
deb-src http://Ubuntu.csie.ntu.edu.tw/ubuntu/ jaunty main restricted universe multiverse
deb http://Ubuntu.csie.ntu.edu.tw/ubuntu/ jaunty-updates main restricted universe multiverse
deb-src http://Ubuntu.csie.ntu.edu.tw/ubuntu/ jaunty-updates main restricted universe multiverse
deb http://Ubuntu.csie.ntu.edu.tw/ubuntu/ jaunty-backports main restricted universe multiverse
deb-src http://Ubuntu.csie.ntu.edu.tw/ubuntu/ jaunty-backports main restricted universe multiverse
deb http://Ubuntu.csie.ntu.edu.tw/ubuntu/ jaunty-security main restricted universe multiverse
deb-src http://Ubuntu.csie.ntu.edu.tw/ubuntu/ jaunty-security main restricted universe multiverse
deb http://Ubuntu.csie.ntu.edu.tw/ubuntu/ jaunty-proposed main multiverse restricted universe
deb-src http://Ubuntu.csie.ntu.edu.tw/ubuntu/ jaunty-proposed main restricted universe multiverse

 

一般的deb包(包括新立得或者apt-get下载的)都在/usr/share。自己下载的压缩包或者编译的包,有些可以选择安装目录,一般放在/usr/local/,也有在/opt的。

另参见apt使用参考:
apt-cache search # ------(package 搜索包)
apt-cache show #------(package 获取包的相关信息,如说明、大小、版本等)
sudo apt-get install # ------(package 安装包)
sudo apt-get install # -----(package - - reinstall 重新安装包)
sudo apt-get -f install # -----(强制安装?#"-f = --fix-missing"当是修复安装吧...)
sudo apt-get remove #-----(package 删除包)
sudo apt-get remove - - purge # ------(package 删除包,包括删除配置文件等)
sudo apt-get autoremove --purge # ----(package 删除包及其依赖的软件包+配置文件等(只对6.10有效,强烈推荐))
sudo apt-get update #------更新源
sudo apt-get upgrade #------更新已安装的包
sudo apt-get dist-upgrade # ---------升级系统
sudo apt-get dselect-upgrade #------使用 dselect 升级
apt-cache depends #-------(package 了解使用依赖)
apt-cache rdepends # ------(package 了解某个具体的依赖?#当是查看该包被哪些包依赖吧...)
sudo apt-get build-dep # ------(package 安装相关的编译环境)
apt-get source #------(package 下载该包的源代码)
sudo apt-get clean && sudo apt-get autoclean # --------清理下载文件的存档 && 只清理过时的包
sudo apt-get check #-------检查是否有损坏的依赖

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics