在 boost lib 中安装问题

在 boost lib 中安装问题

如何安装 boost lib,我按照解决方案操作,但收到以下消息:

为了添加更多信息,我试图根据我发布的这个帖子来安装库: python keplerian 工具箱

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:
 libboost-all-dev : Depends: libboost-dev but it is not going to be installed
                    Depends: libboost-chrono-dev but it is not going to be installed
                    Depends: libboost-date-time-dev but it is not going to be installed
                    Depends: libboost-filesystem-dev but it is not going to be installed
                    Depends: libboost-graph-dev but it is not going to be installed
                    Depends: libboost-graph-parallel-dev but it is not going to be installed
                    Depends: libboost-iostreams-dev but it is not going to be installed
                    Depends: libboost-locale-dev but it is not going to be installed
                    Depends: libboost-math-dev but it is not going to be installed
                    Depends: libboost-mpi-dev but it is not going to be installed
                    Depends: libboost-mpi-python-dev but it is not going to be installed
                    Depends: libboost-program-options-dev but it is not going to be installed
                    Depends: libboost-python-dev but it is not going to be installed
                    Depends: libboost-random-dev but it is not going to be installed
                    Depends: libboost-regex-dev but it is not going to be installed
                    Depends: libboost-serialization-dev but it is not going to be installed
                    Depends: libboost-signals-dev but it is not going to be installed
                    Depends: libboost-system-dev but it is not going to be installed
                    Depends: libboost-test-dev but it is not going to be installed
                    Depends: libboost-thread-dev but it is not going to be installed
                    Depends: libboost-timer-dev but it is not going to be installed
                    Depends: libboost-wave-dev but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

我该如何解决?

ii  libboost-atomic1.53-dev                   1.53.0-3                               amd64        atomic data types, operations, and memory ordering constraints
ii  libboost-atomic1.53.0                     1.53.0-3                               amd64        atomic data types, operations, and memory ordering constraints
ii  libboost-chrono1.53-dev                   1.53.0-3                               amd64        C++ representation of time duration, time point, and clocks
ii  libboost-chrono1.53.0                     1.53.0-3                               amd64        C++ representation of time duration, time point, and clocks
ii  libboost-context1.53-dev                  1.53.0-3                               amd64        provides a sort of cooperative multitasking on a single thread
ii  libboost-context1.53.0                    1.53.0-3                               amd64        provides a sort of cooperative multitasking on a single thread
ii  libboost-date-time1.49.0                  1.49.0-3.2ubuntu1                      amd64        set of date-time libraries based on generic programming concepts
ii  libboost-date-time1.53-dev                1.53.0-3                               amd64        set of date-time libraries based on generic programming concepts
ii  libboost-date-time1.53.0                  1.53.0-3                               amd64        set of date-time libraries based on generic programming concepts
ii  libboost-exception1.53-dev                1.53.0-3                               amd64        set of date-time libraries based on generic programming concepts
ii  libboost-filesystem1.53-dev               1.53.0-3                               amd64        filesystem operations (portable paths, iteration over directories, etc) in C++
ii  libboost-filesystem1.53.0                 1.53.0-3                               amd64        filesystem operations (portable paths, iteration over directories, etc) in C++
ii  libboost-graph-parallel1.53-dev           1.53.0-3                               amd64        generic graph components and algorithms in C++
ii  libboost-graph-parallel1.53.0             1.53.0-3                               amd64        generic graph components and algorithms in C++
ii  libboost-graph1.53-dev                    1.53.0-3                               amd64        generic graph components and algorithms in C++
ii  libboost-graph1.53.0                      1.53.0-3                               amd64        generic graph components and algorithms in C++
ii  libboost-iostreams1.49.0                  1.49.0-3.2ubuntu1                      amd64        Boost.Iostreams Library
ii  libboost-iostreams1.53-dev                1.53.0-3                               amd64        Boost.Iostreams Library development files
ii  libboost-iostreams1.53.0                  1.53.0-3                               amd64        Boost.Iostreams Library
ii  libboost-locale1.53-dev                   1.53.0-3                               amd64        C++ facilities for localization
ii  libboost-locale1.53.0                     1.53.0-3                               amd64        C++ facilities for localization
ii  libboost-math1.53-dev                     1.53.0-3                               amd64        Boost.Math Library development files
ii  libboost-math1.53.0                       1.53.0-3                               amd64        Boost.Math Library
ii  libboost-mpi-python1.53-dev               1.53.0-3                               amd64        C++ interface to the Message Passing Interface (MPI), Python Bindings
ii  libboost-mpi-python1.53.0                 1.53.0-3                               amd64        C++ interface to the Message Passing Interface (MPI), Python Bindings
ii  libboost-mpi1.53-dev                      1.53.0-3                               amd64        C++ interface to the Message Passing Interface (MPI)
ii  libboost-mpi1.53.0                        1.53.0-3                               amd64        C++ interface to the Message Passing Interface (MPI)
ii  libboost-program-options1.53-dev          1.53.0-3                               amd64        program options library for C++
ii  libboost-program-options1.53.0            1.53.0-3                               amd64        program options library for C++
ii  libboost-python1.53-dev                   1.53.0-3                               amd64        Boost.Python Library development files
ii  libboost-python1.53.0                     1.53.0-3                               amd64        Boost.Python Library
ii  libboost-random1.53-dev                   1.53.0-3                               amd64        Boost Random Number Library
ii  libboost-random1.53.0                     1.53.0-3                               amd64        Boost Random Number Library
ii  libboost-regex1.53-dev                    1.53.0-3                               amd64        regular expression library for C++
ii  libboost-regex1.53.0                      1.53.0-3                               amd64        regular expression library for C++
ii  libboost-serialization1.53-dev            1.53.0-3                               amd64        serialization library for C++
ii  libboost-serialization1.53.0              1.53.0-3                               amd64        serialization library for C++
ii  libboost-signals1.53-dev                  1.53.0-3                               amd64        managed signals and slots library for C++
ii  libboost-signals1.53.0                    1.53.0-3                               amd64        managed signals and slots library for C++
ii  libboost-system1.53-dev                   1.53.0-3                               amd64        Operating system (e.g. diagnostics support) library
ii  libboost-system1.53.0                     1.53.0-3                               amd64        Operating system (e.g. diagnostics support) library
ii  libboost-test1.53-dev                     1.53.0-3                               amd64        components for writing and executing test suites
ii  libboost-test1.53.0                       1.53.0-3                               amd64        components for writing and executing test suites
ii  libboost-thread1.53-dev                   1.53.0-3                               amd64        portable C++ multi-threading
ii  libboost-thread1.53.0                     1.53.0-3                               amd64        portable C++ multi-threading
ii  libboost-timer1.53-dev                    1.53.0-3                               amd64        C++ wall clock and CPU process timers
ii  libboost-timer1.53.0                      1.53.0-3                               amd64        C++ wall clock and CPU process timers
ii  libboost-wave1.53-dev                     1.53.0-3                               amd64        C99/C++ preprocessor library
ii  libboost-wave1.53.0                       1.53.0-3                               amd64        C99/C++ preprocessor library
ii  libboost1.53-all-dev                      1.53.0-3                               amd64        Boost C++ Libraries development files (ALL)
ii  libboost1.53-dev                          1.53.0-3                               amd64        Boost C++ Libraries development files

答案1

好的,看来你已经安装了更高版本的 boost (1.53),libboost-all-dev 指向的当前版本是 1.49(请参阅)。您无法同时安装两者,因此如果您想安装旧版本,则需要删除较新的版本。

答案2

由于您正在将二进制文件解压到系统中,因此只需卸载并再次安装软件包即可,速度会更快。

卸载

sudo apt-get remove libboost-all-dev

然后再次安装

sudo apt-get install libboost-all-dev

最后你可以用

sudo apt-get autoremove

相关内容