apt-get 是Debian系Linux发行版(Debian,Ubuntu,Mint等)中的软件包管理工具。apt-get命令可以从网络随心所欲的管理Debian系统中的软件包,当要安装软件包时,自动从Debian的镜像服务器上下载所需要的软件和安全更新。
apt-get安装软件时,有的时候需要依赖更低版本的依赖库,经常系统中的依赖库都是比较新的。如何设置才可以使用低版本的依赖库呢?
xda@xda-dt:~$ sudo apt-get install sqlite3 libsqlite3-0=3.7.9-2ubuntu1.1 Reading package lists... Done Building dependency tree Reading state information... Done libsqlite3-0 is already the newest version. Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation: The following packages have unmet dependencies: sqlite3 : Depends: libsqlite3-0 (= 3.7.9-2ubuntu1) but 3.7.9-2ubuntu1.1 is to be installed E: Unable to correct problems, you have held broken packages.
会出现上面的问题。
xda@xda-dt:~$ sudo aptitude install sqlite3 The following NEW packages will be installed: sqlite3{b} 0 packages upgraded, 1 newly installed, 0 to remove and 0 not upgraded. Need to get 26.9 kB of archives. After unpacking 174 kB will be used. The following packages have unmet dependencies: sqlite3 : Depends: libsqlite3-0 (= 3.7.9-2ubuntu1) but 3.7.9-2ubuntu1.1 is installed. The following actions will resolve these dependencies: Keep the following packages at their current version: 1) sqlite3 [Not Installed] Accept this solution? [Y/n/q/?] n The following actions will resolve these dependencies: Downgrade the following packages: 1) libsqlite3-0 [3.7.9-2ubuntu1.1 (now) -> 3.7.9-2ubuntu1 (precise)] Accept this solution? [Y/n/q/?] Y The following packages will be DOWNGRADED: libsqlite3-0 The following NEW packages will be installed: sqlite3 0 packages upgraded, 1 newly installed, 1 downgraded, 0 to remove and 0 not upgraded. Need to get 375 kB of archives. After unpacking 174 kB will be used. Do you want to continue? [Y/n/?] Y Get: 1 http://hk.archive.ubuntu.com/ubuntu/ precise/main libsqlite3-0 amd64 3.7.9-2ubuntu1 [348 kB] Get: 2 http://hk.archive.ubuntu.com/ubuntu/ precise/main sqlite3 amd64 3.7.9-2ubuntu1 [26.9 kB] Fetched 375 kB in 1s (306 kB/s) dpkg: warning: downgrading libsqlite3-0 from 3.7.9-2ubuntu1.1 to 3.7.9-2ubuntu1. (Reading database ... 162912 files and directories currently installed.) Preparing to replace libsqlite3-0 3.7.9-2ubuntu1.1 (using .../libsqlite3-0_3.7.9-2ubuntu1_amd64.deb) ... Unpacking replacement libsqlite3-0 ... Selecting previously unselected package sqlite3. Unpacking sqlite3 (from .../sqlite3_3.7.9-2ubuntu1_amd64.deb) ... Processing triggers for man-db ... Setting up libsqlite3-0 (3.7.9-2ubuntu1) ... Setting up sqlite3 (3.7.9-2ubuntu1) ... Processing triggers for libc-bin ... ldconfig deferred processing now taking place xda@xda-dt:~$ sqlite3 SQLite version 3.7.9 2011-11-01 00:52:41 Enter ".help" for instructions Enter SQL statements terminated with a ";" sqlite> .exit
华为eNSP:静态NAT、动态NAT、端口NAT的配置(NAPT)-网络地址转换