最新消息:20210816 当前crifan.com域名已被污染,为防止失联,请关注(页面右下角的)公众号

【已解决】Ubuntu中用apt-get install安装特定版本的软件包

Ubuntu crifan 13504浏览 0评论

【问题】

折腾:

【未解决】交叉编译出错:../Include/lnmanager.h:74:27: fatal error: xmlrpc_client.h: No such file or directory

期间,需要把libtool从2.4.2,换成2.4版本的。

 

【折腾过程】

1.参考:

How to install specific Ubuntu packages, with exact version? [closed]

去试试:

crifan@ubuntu:xmlrpc-c-1.06.31$ sudo apt-get install libtool=2.4
Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Version '2.4' for 'libtool' was not found
crifan@ubuntu:xmlrpc-c-1.06.31$ sudo apt-get install libtool
Reading package lists... Done
Building dependency tree       
Reading state information... Done
libtool is already the newest version.
The following packages were automatically installed and are no longer required:
  fakeroot g++-4.7 libstdc++6-4.7-dev
Use 'apt-get autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 202 not upgraded.
crifan@ubuntu:xmlrpc-c-1.06.31$ sudo apt-get install libtool^C
crifan@ubuntu:xmlrpc-c-1.06.31$ apt-cache showpkg libtool
Package: libtool
Versions: 
2.4.2-1.2ubuntu1 (/var/lib/apt/lists/mirrors.163.com_ubuntu_dists_raring_main_binary-i386_Packages) (/var/lib/dpkg/status)
 Description Language: 
                 File: /var/lib/apt/lists/mirrors.163.com_ubuntu_dists_precise_main_binary-i386_Packages
                  MD5: 40ea3da4a4ea75419ad95742898b3e52
 Description Language: en
                 File: /var/lib/apt/lists/mirrors.163.com_ubuntu_dists_precise_main_i18n_Translation-en
                  MD5: 40ea3da4a4ea75419ad95742898b3e52

2.4.2-1ubuntu1 (/var/lib/apt/lists/mirrors.163.com_ubuntu_dists_precise_main_binary-i386_Packages)
 Description Language: 
                 File: /var/lib/apt/lists/mirrors.163.com_ubuntu_dists_precise_main_binary-i386_Packages
                  MD5: 40ea3da4a4ea75419ad95742898b3e52
 Description Language: en
                 File: /var/lib/apt/lists/mirrors.163.com_ubuntu_dists_precise_main_i18n_Translation-en
                  MD5: 40ea3da4a4ea75419ad95742898b3e52


Reverse Depends: 
  wireshark-dev,libtool
  php5-dev,libtool 2.2
  php5-dev,libtool 2.2
  xfce4-dev-tools,libtool
  wireshark-dev,libtool
  slapos-node-unofficial,libtool
  ruby-build,libtool
  proftpd-dev,libtool
  packaging-dev,libtool
  libsidl-dev,libtool
  liblua5.2-dev,libtool
  libdune-common-dev,libtool
  grid-packaging-tools,libtool
  gnulib,libtool
  gcc-powerpc-linux-gnu,libtool
  gcc-arm-linux-gnueabihf,libtool
  gcc-arm-linux-gnueabi,libtool
  gcc-aarch64-linux-gnu,libtool
  freehdl,libtool
  drizzle-plugin-dev,libtool
  dh-lua,libtool
  dell-recovery-bootloader,libtool
  anjuta,libtool
  php5-dev,libtool 2.2
  php5-dev,libtool 2.2
  mm-common,libtool 1.5
  liblua5.1-0-dev,libtool
  libltdl-dev,libtool 1.5.20
  libltdl-dev,libtool 1.5.20
  libltdl-dev,libtool
  gnome-common,libtool
  gcc,libtool
  dh-autoreconf,libtool 2.4.2
  autoconf,libtool
  php5-dev,libtool 2.2
  php5-dev,libtool 2.2
  xfce4-dev-tools,libtool
  wireshark-dev,libtool
  proftpd-dev,libtool
  planner-dev,libtool
  packaging-dev,libtool
  lua5.1-policy-dev,libtool
  libsidl-dev,libtool
  liblua5.2-dev,libtool
  grid-packaging-tools,libtool
  gnulib,libtool
  gcc-arm-linux-gnueabihf,libtool
  gcc-arm-linux-gnueabi,libtool
  freehdl,libtool
  drizzle-plugin-dev,libtool
  dh-lua,libtool
  dell-recovery-bootloader,libtool
  anjuta,libtool
  shtool,libtool
  php5-dev,libtool 2.2
  php5-dev,libtool 2.2
  mm-common,libtool 1.5
  liblua5.1-0-dev,libtool
  libltdl-dev,libtool 1.5.20
  libltdl-dev,libtool 1.5.20
  libltdl-dev,libtool
  gnome-common,libtool
  gcc,libtool
  dh-autoreconf,libtool
  autoconf,libtool
Dependencies: 
2.4.2-1.2ubuntu1 - gcc (16 (null)) c-compiler (0 (null)) cpp (0 (null)) libc6-dev (16 (null)) libc-dev (0 (null)) file (0 (null)) autotools-dev (0 (null)) libtool-doc (0 (null)) autoconf (4 2.50) automaken (0 (null)) gfortran (16 (null)) fortran95-compiler (0 (null)) gcj (0 (null)) libltdl-dev (0 (null)) autoconf (1 2.12) automake (1 1.3) libtool1.4 (0 (null)) 
2.4.2-1ubuntu1 - gcc (16 (null)) c-compiler (0 (null)) cpp (0 (null)) libc6-dev (16 (null)) libc-dev (0 (null)) file (0 (null)) autotools-dev (0 (null)) libtool-doc (0 (null)) autoconf (4 2.50) automaken (0 (null)) gfortran (16 (null)) fortran95-compiler (0 (null)) gcj (0 (null)) libltdl-dev (0 (null)) autoconf (1 2.12) automake (1 1.3) libtool1.4 (0 (null)) 
Provides: 
2.4.2-1.2ubuntu1 - 
2.4.2-1ubuntu1 - 
Reverse Provides: 
crifan@ubuntu:xmlrpc-c-1.06.31$ 

我此处只是暂时没有2.4的,所以不给安装。

语法上,是对的。

 

2。参考:

Chapter 3 – Managing packages

即:

apt-get install package=version

举例:

apt-get install nautilus=2.2.4-1

 

【总结】

即:

apt-get install package=version

转载请注明:在路上 » 【已解决】Ubuntu中用apt-get install安装特定版本的软件包

发表我的评论
取消评论

表情

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址
82 queries in 0.182 seconds, using 22.63MB memory