Boost C++ could not be installed in LEAP 15.1

Hi,
I tried to install ‘boost’ and ‘boost-base’ (C++ library) using YaST and also on the command line with zypper, but both failed. I followed instructions from (https://software.opensuse.org/download/package?package=boost-base&project=openSUSE%3ALeap%3A15.1%3AUpdate).

Here is the output from command line execution:


:
:
URI : http://download.opensuse.org/update/leap/15.1/oss/
Enabled : Yes
GPG Check : Yes
Autorefresh : No
Priority : 99 (default priority)

ocalhost:~ # zypper refresh
Repository ‘Online updates for openSUSE Leap:15.1 (standard)’ is up to date.
Repository ‘Debug Repository’ is up to date.
Repository ‘Update Repository (Debug)’ is up to date.
Repository ‘Non-OSS Repository’ is up to date.
Repository ‘Main Repository’ is up to date.
Repository ‘Source Repository’ is up to date.
Repository ‘Main Update Repository’ is up to date.
Repository ‘Update Repository (Non-Oss)’ is up to date.
Repository ‘Microsoft Visual Studio Code’ is up to date.
All repositories have been refreshed.
localhost:~ # zypper install boost
Loading repository data…
Reading installed packages…
‘boost’ not found in package names. Trying capabilities.
No provider of ‘boost’ found.
Resolving package dependencies…

Nothing to do.
localhost:~ # zypper install boost-base
Loading repository data…
Reading installed packages…
‘boost-base’ not found in package names. Trying capabilities.
No provider of ‘boost-base’ found.
Resolving package dependencies…

Nothing to do.

Any help to get boost installed is appreciated.

Search software.opensuse.org for boost version needed and add to list of repos:


erlangen:~ # zypper repos boost
Alias          : boost
Name           : boost
URI            : http://download.opensuse.org/repositories/home:/drhax9908:/branches:/home:/snagview:/gearmand155/openSUSE_Tumbleweed/
Enabled        : Yes
GPG Check      : (r ) Yes
Priority       : 100 (lowered priority)
Autorefresh    : On
Keep Packages  : Off
Type           : rpm-md
GPG Key URI    : http://download.opensuse.org/repositories/home:/drhax9908:/branches:/home:/snagview:/gearmand155/openSUSE_Tumbleweed/repodata/repomd.xml.key
Path Prefix    : 
Parent Service : 
Keywords       : ---
Repo Info Path : /etc/zypp/repos.d/home_drhax9908_branches_home_snagview_gearmand155.repo
MD Cache Path  : /var/cache/zypp/raw/boost
erlangen:~ #

“boost” or “boost-base” are names of source packages. They are used to build binary packages, not to be used directly. Some of these binary packages are likely already installed. Check “zypper se boost” and pay attention to Type column.

If you really want to install source package, use “zypper install --type srcpackage”, but I suspect that is not what you need. Explain in more details what you are trying to do.

You recommend user to use Tumbleweed home​ repository for Leap 15.1 and that for something that is already part of Leap 15.1. Why am I not surprised …

Different software requires different versions:


S | Name                           | Type    | Version     | Arch   | Repository
--+--------------------------------+---------+-------------+--------+-----------------------
i | boost-license1_68_0            | package | 1.68.0-2.14 | noarch | boost
i | boost-license1_71_0            | package | 1.71.0-9.4  | noarch | Haupt-Repository (OSS)
i | libboost_date_time1_68_0       | package | 1.68.0-2.14 | x86_64 | boost
i | libboost_date_time1_71_0       | package | 1.71.0-9.4  | x86_64 | Haupt-Repository (OSS)
i | libboost_filesystem1_68_0      | package | 1.68.0-2.14 | x86_64 | boost
i | libboost_filesystem1_71_0      | package | 1.71.0-9.4  | x86_64 | Haupt-Repository (OSS)
i | libboost_iostreams1_68_0       | package | 1.68.0-2.14 | x86_64 | boost
i | libboost_iostreams1_71_0       | package | 1.71.0-9.4  | x86_64 | Haupt-Repository (OSS)
i | libboost_locale1_71_0          | package | 1.71.0-9.4  | x86_64 | Haupt-Repository (OSS)
i | libboost_program_options1_68_0 | package | 1.68.0-2.14 | x86_64 | boost
i | libboost_program_options1_71_0 | package | 1.71.0-9.4  | x86_64 | Haupt-Repository (OSS)
i | libboost_regex1_68_0           | package | 1.68.0-2.14 | x86_64 | boost
i | libboost_regex1_71_0           | package | 1.71.0-9.4  | x86_64 | Haupt-Repository (OSS)
i | libboost_signals1_68_0         | package | 1.68.0-2.14 | x86_64 | boost
i | libboost_system1_68_0          | package | 1.68.0-2.14 | x86_64 | boost
i | libboost_thread1_68_0          | package | 1.68.0-2.14 | x86_64 | boost
i | libboost_thread1_71_0          | package | 1.71.0-9.4  | x86_64 | Haupt-Repository (OSS)

Thanks for your reply.

I need Boost C++ headers for one of my C++ projects, and I don’t mind any additional things that come with Boost. So, I searched in Google with “OpenSUSE Leap 15.1 boost c++” and the first link lead me to [openSUSE Software] which has two options “Direct Install” and “Expert Download” both of which fail to install boost. Similar thing happens with ‘boost-base’.

This looks like a problem with OpenSUSE links or packaging or something that leads one to believe there is a package called ‘boost’ which can be installed with YaST or Zypper, but not so. This has wasted lot of time for me to look around my system to find why I was not able install them. I finally figured out the right package within boost by ‘zypper se boost’ and reading package descriptions to figure out what is needed to compile my project.

However, I still don’t understand why the link exists for something that cannot be installed. I don’t know how to report this problem as I am very new to OpenSUSE forums and also not an active community participant. I appreciate all the replies so far and the main issue is resolved for me as of now.

You need libboost*-devel packages. Which exactly depends on which headers you need. If in doubt, you can simply do

zypper in 'libboost*-devel'

which installs everything.

Searching in software.opensuse.org reveals that boost packages have distinct versions for Tumbleweed, Leap 15.1, 15.2, SLE-15 and more. You need to select the version matching your system.

+1.

Also,
Some recommendations…
Install the C Development pattern (for the newcomer, use YaST Software Manager, Patterns view)
It should install all the likely base development libraries you’ll need, and I’d guess nearly 100% that libboost will be installed… It’s such a commonly needed library.

As @arvidjaar describes, you should know that libraries used to build/compile have a “-devel” appended to the package name. Regular “ready to run” libraries used to simply run things (often pre-compiled code) won’t be designated that way.

I’d also recommend that for Development related questions including setup like this and anything thereafter, you should post in the Development forums instead of this Forum which is mainly frequented by Users looking for answers.

TSU

As a newbie I installed iteratively required packages by trial and error, which is tedious. But patterns are a great feature:

erlangen:~ # zypper search --type pattern --installed-only --details 
Loading repository data...
Reading installed packages...

S  | Name          | Type    | Version      | Arch   | Repository
---+---------------+---------+--------------+--------+-----------------------
i  | apparmor      | pattern | 20200505-3.1 | x86_64 | Haupt-Repository (OSS)
i+ | base          | pattern | 20200505-3.1 | x86_64 | Haupt-Repository (OSS)
i+ | enhanced_base | pattern | 20200505-3.1 | x86_64 | Haupt-Repository (OSS)
i  | fonts         | pattern | 20170319-5.5 | x86_64 | Haupt-Repository (OSS)
i  | games         | pattern | 20170319-2.5 | x86_64 | Haupt-Repository (OSS)
i+ | kde           | pattern | 20181130-3.2 | noarch | Haupt-Repository (OSS)
i  | kde_pim       | pattern | 20181130-3.2 | noarch | Haupt-Repository (OSS)
i  | kde_plasma    | pattern | 20181130-3.2 | noarch | Haupt-Repository (OSS)
i+ | lamp_server   | pattern | 20200325-1.1 | x86_64 | Haupt-Repository (OSS)
i  | minimal_base  | pattern | 20200505-3.1 | x86_64 | Haupt-Repository (OSS)
i  | multimedia    | pattern | 20170319-8.2 | x86_64 | Haupt-Repository (OSS)
i  | office        | pattern | 20170506-3.5 | x86_64 | Haupt-Repository (OSS)
i  | sw_management | pattern | 20200505-3.1 | x86_64 | Haupt-Repository (OSS)
i+ | x11           | pattern | 20200505-3.1 | x86_64 | Haupt-Repository (OSS)
i+ | yast2_basis   | pattern | 20190411-1.4 | x86_64 | Haupt-Repository (OSS)
erlangen:~ # 
erlangen:~ # zypper install --type pattern lamp_server
Loading repository data...
Reading installed packages...
'pattern:lamp_server' is already installed.
No update candidate for 'pattern:lamp_server-20200325-1.1.x86_64'. The highest available version is already installed.
Resolving package dependencies...

Nothing to do.
erlangen:~ # 

https://software.opensuse.org/search?utf8=✓&baseproject=ALL&q=boost
https://software.opensuse.org/search?utf8=✓&baseproject=ALL&q=boost+mpi
https://software.opensuse.org/search?utf8=✓&baseproject=ALL&q=boost+hpc

etc. …

  • installs everything from repositories user already have.

Thank you for the information. My problem is solved by trial and error, but good to know there are patterns. I am newbie, so did not know what forum is appropriate.

I still think there is this problem with the link to install boost, which is misleading and does not work. I appreciate experts taking some action on that.

Thank you. These examples are helpful for my future work.

Yes, simply searching for Boost related to openSUSE doesn’t bring up anything easily understood – on the other hand, Internet searches often produce such results …

Taking a look into the openSUSE repositories for “Boost” reveals that, openSUSE offers Boost C++ Libraries – the source code is available in the “boost-base” RPM package.
Performing “zypper info boost-base” from a CLI produces the information that “boost-base” is a source package and, the following list of binary library packages are built when the source code is compiled:


    S | Name                                           | Version
    --+------------------------------------------------+-------------------
      | boost-base-debugsource                         | 1.66.0-lp151.5.3.1
    i | boost-license1_66_0                            | 1.66.0-lp151.5.3.1
    i | boost_1_66-jam                                 | 1.66.0-lp151.5.3.1
      | libboost_atomic1_66_0                          | 1.66.0-lp151.5.3.1
      | libboost_atomic1_66_0-32bit                    | 1.66.0-lp151.5.3.1
      | libboost_atomic1_66_0-32bit-debuginfo          | 1.66.0-lp151.5.3.1
      | libboost_atomic1_66_0-debuginfo                | 1.66.0-lp151.5.3.1
      | libboost_atomic1_66_0-devel                    | 1.66.0-lp151.5.3.1
      | libboost_chrono1_66_0                          | 1.66.0-lp151.5.3.1
      | libboost_chrono1_66_0-debuginfo                | 1.66.0-lp151.5.3.1
      | libboost_chrono1_66_0-devel                    | 1.66.0-lp151.5.3.1
      | libboost_container1_66_0                       | 1.66.0-lp151.5.3.1
      | libboost_container1_66_0-32bit                 | 1.66.0-lp151.5.3.1
      | libboost_container1_66_0-32bit-debuginfo       | 1.66.0-lp151.5.3.1
      | libboost_container1_66_0-debuginfo             | 1.66.0-lp151.5.3.1
      | libboost_container1_66_0-devel                 | 1.66.0-lp151.5.3.1
      | libboost_context1_66_0                         | 1.66.0-lp151.5.3.1
      | libboost_context1_66_0-32bit                   | 1.66.0-lp151.5.3.1
      | libboost_context1_66_0-32bit-debuginfo         | 1.66.0-lp151.5.3.1
      | libboost_context1_66_0-debuginfo               | 1.66.0-lp151.5.3.1
      | libboost_context1_66_0-devel                   | 1.66.0-lp151.5.3.1
      | libboost_coroutine1_66_0                       | 1.66.0-lp151.5.3.1
      | libboost_coroutine1_66_0-32bit                 | 1.66.0-lp151.5.3.1
      | libboost_coroutine1_66_0-32bit-debuginfo       | 1.66.0-lp151.5.3.1
      | libboost_coroutine1_66_0-debuginfo             | 1.66.0-lp151.5.3.1
      | libboost_coroutine1_66_0-devel                 | 1.66.0-lp151.5.3.1
    i | libboost_date_time1_66_0                       | 1.66.0-lp151.5.3.1
      | libboost_date_time1_66_0-32bit                 | 1.66.0-lp151.5.3.1
      | libboost_date_time1_66_0-32bit-debuginfo       | 1.66.0-lp151.5.3.1
      | libboost_date_time1_66_0-debuginfo             | 1.66.0-lp151.5.3.1
      | libboost_date_time1_66_0-devel                 | 1.66.0-lp151.5.3.1
      | libboost_fiber1_66_0                           | 1.66.0-lp151.5.3.1
      | libboost_fiber1_66_0-32bit                     | 1.66.0-lp151.5.3.1
      | libboost_fiber1_66_0-32bit-debuginfo           | 1.66.0-lp151.5.3.1
      | libboost_fiber1_66_0-debuginfo                 | 1.66.0-lp151.5.3.1
      | libboost_fiber1_66_0-devel                     | 1.66.0-lp151.5.3.1
    i | libboost_filesystem1_66_0                      | 1.66.0-lp151.5.3.1
      | libboost_filesystem1_66_0-32bit                | 1.66.0-lp151.5.3.1
      | libboost_filesystem1_66_0-32bit-debuginfo      | 1.66.0-lp151.5.3.1
      | libboost_filesystem1_66_0-debuginfo            | 1.66.0-lp151.5.3.1
      | libboost_filesystem1_66_0-devel                | 1.66.0-lp151.5.3.1
      | libboost_graph1_66_0                           | 1.66.0-lp151.5.3.1
      | libboost_graph1_66_0-32bit                     | 1.66.0-lp151.5.3.1
      | libboost_graph1_66_0-32bit-debuginfo           | 1.66.0-lp151.5.3.1
      | libboost_graph1_66_0-debuginfo                 | 1.66.0-lp151.5.3.1
      | libboost_graph1_66_0-devel                     | 1.66.0-lp151.5.3.1
    i | libboost_headers1_66_0-devel                   | 1.66.0-lp151.5.3.1
    i | libboost_iostreams1_66_0                       | 1.66.0-lp151.5.3.1
      | libboost_iostreams1_66_0-32bit                 | 1.66.0-lp151.5.3.1
      | libboost_iostreams1_66_0-32bit-debuginfo       | 1.66.0-lp151.5.3.1
      | libboost_iostreams1_66_0-debuginfo             | 1.66.0-lp151.5.3.1
      | libboost_iostreams1_66_0-devel                 | 1.66.0-lp151.5.3.1
    i | libboost_locale1_66_0                          | 1.66.0-lp151.5.3.1
      | libboost_locale1_66_0-32bit                    | 1.66.0-lp151.5.3.1
      | libboost_locale1_66_0-32bit-debuginfo          | 1.66.0-lp151.5.3.1
      | libboost_locale1_66_0-debuginfo                | 1.66.0-lp151.5.3.1
      | libboost_locale1_66_0-devel                    | 1.66.0-lp151.5.3.1
      | libboost_log1_66_0                             | 1.66.0-lp151.5.3.1
      | libboost_log1_66_0-debuginfo                   | 1.66.0-lp151.5.3.1
      | libboost_log1_66_0-devel                       | 1.66.0-lp151.5.3.1
      | libboost_math1_66_0                            | 1.66.0-lp151.5.3.1
      | libboost_math1_66_0-32bit                      | 1.66.0-lp151.5.3.1
      | libboost_math1_66_0-32bit-debuginfo            | 1.66.0-lp151.5.3.1
      | libboost_math1_66_0-debuginfo                  | 1.66.0-lp151.5.3.1
      | libboost_math1_66_0-devel                      | 1.66.0-lp151.5.3.1
    i | libboost_program_options1_66_0                 | 1.66.0-lp151.5.3.1
      | libboost_program_options1_66_0-32bit           | 1.66.0-lp151.5.3.1
      | libboost_program_options1_66_0-32bit-debuginfo | 1.66.0-lp151.5.3.1
      | libboost_program_options1_66_0-debuginfo       | 1.66.0-lp151.5.3.1
      | libboost_program_options1_66_0-devel           | 1.66.0-lp151.5.3.1
      | libboost_random1_66_0                          | 1.66.0-lp151.5.3.1
      | libboost_random1_66_0-32bit                    | 1.66.0-lp151.5.3.1
      | libboost_random1_66_0-32bit-debuginfo          | 1.66.0-lp151.5.3.1
      | libboost_random1_66_0-debuginfo                | 1.66.0-lp151.5.3.1
      | libboost_random1_66_0-devel                    | 1.66.0-lp151.5.3.1
      | libboost_regex1_66_0                           | 1.66.0-lp151.5.3.1
      | libboost_regex1_66_0-32bit                     | 1.66.0-lp151.5.3.1
      | libboost_regex1_66_0-32bit-debuginfo           | 1.66.0-lp151.5.3.1
      | libboost_regex1_66_0-debuginfo                 | 1.66.0-lp151.5.3.1
      | libboost_regex1_66_0-devel                     | 1.66.0-lp151.5.3.1
      | libboost_serialization1_66_0                   | 1.66.0-lp151.5.3.1
      | libboost_serialization1_66_0-32bit             | 1.66.0-lp151.5.3.1
      | libboost_serialization1_66_0-32bit-debuginfo   | 1.66.0-lp151.5.3.1
      | libboost_serialization1_66_0-debuginfo         | 1.66.0-lp151.5.3.1
      | libboost_serialization1_66_0-devel             | 1.66.0-lp151.5.3.1
      | libboost_signals1_66_0                         | 1.66.0-lp151.5.3.1
      | libboost_signals1_66_0-32bit                   | 1.66.0-lp151.5.3.1
      | libboost_signals1_66_0-32bit-debuginfo         | 1.66.0-lp151.5.3.1
      | libboost_signals1_66_0-debuginfo               | 1.66.0-lp151.5.3.1
      | libboost_signals1_66_0-devel                   | 1.66.0-lp151.5.3.1
      | libboost_stacktrace1_66_0                      | 1.66.0-lp151.5.3.1
      | libboost_stacktrace1_66_0-32bit                | 1.66.0-lp151.5.3.1
      | libboost_stacktrace1_66_0-32bit-debuginfo      | 1.66.0-lp151.5.3.1
      | libboost_stacktrace1_66_0-debuginfo            | 1.66.0-lp151.5.3.1
      | libboost_stacktrace1_66_0-devel                | 1.66.0-lp151.5.3.1
    i | libboost_system1_66_0                          | 1.66.0-lp151.5.3.1
      | libboost_system1_66_0-32bit                    | 1.66.0-lp151.5.3.1
      | libboost_system1_66_0-32bit-debuginfo          | 1.66.0-lp151.5.3.1
      | libboost_system1_66_0-debuginfo                | 1.66.0-lp151.5.3.1
      | libboost_system1_66_0-devel                    | 1.66.0-lp151.5.3.1
      | libboost_test1_66_0                            | 1.66.0-lp151.5.3.1
      | libboost_test1_66_0-32bit                      | 1.66.0-lp151.5.3.1
      | libboost_test1_66_0-32bit-debuginfo            | 1.66.0-lp151.5.3.1
      | libboost_test1_66_0-debuginfo                  | 1.66.0-lp151.5.3.1
      | libboost_test1_66_0-devel                      | 1.66.0-lp151.5.3.1
    i | libboost_thread1_66_0                          | 1.66.0-lp151.5.3.1
      | libboost_thread1_66_0-32bit                    | 1.66.0-lp151.5.3.1
      | libboost_thread1_66_0-32bit-debuginfo          | 1.66.0-lp151.5.3.1
      | libboost_thread1_66_0-debuginfo                | 1.66.0-lp151.5.3.1
      | libboost_thread1_66_0-devel                    | 1.66.0-lp151.5.3.1
      | libboost_timer1_66_0                           | 1.66.0-lp151.5.3.1
      | libboost_timer1_66_0-debuginfo                 | 1.66.0-lp151.5.3.1
      | libboost_timer1_66_0-devel                     | 1.66.0-lp151.5.3.1
      | libboost_type_erasure1_66_0                    | 1.66.0-lp151.5.3.1
      | libboost_type_erasure1_66_0-32bit              | 1.66.0-lp151.5.3.1
      | libboost_type_erasure1_66_0-32bit-debuginfo    | 1.66.0-lp151.5.3.1
      | libboost_type_erasure1_66_0-debuginfo          | 1.66.0-lp151.5.3.1
      | libboost_type_erasure1_66_0-devel              | 1.66.0-lp151.5.3.1
      | libboost_wave1_66_0                            | 1.66.0-lp151.5.3.1
      | libboost_wave1_66_0-32bit                      | 1.66.0-lp151.5.3.1
      | libboost_wave1_66_0-32bit-debuginfo            | 1.66.0-lp151.5.3.1
      | libboost_wave1_66_0-debuginfo                  | 1.66.0-lp151.5.3.1
      | libboost_wave1_66_0-devel                      | 1.66.0-lp151.5.3.1

Possibly superfluous but, C++ developers use these libraries to provide support for tasks and structures such as linear algebra, pseudorandom number generation, multithreading, image processing, regular expressions, and unit testing.

IIRC the last time I likely posted public code for installing a C/C++ development environment was to build by script the Leela chess engine (see below)

You can inspect the code on this page for the full unattended setup that automatically detects the version of openSUSE installed (ie TW or LEAP, and what distro version number), install the appropriate repositories for the installed openSUSE, install the necessary C/C++ development libraries plus any other tools that might be needed, and then when the development tools and libraries/dependencies are installed clone the main Leela project and build the entire thing.

The code
https://github.com/putztzu/lc0/blob/master/install_openSUSE_lc0.sh

The specific C/C++ Development pattern you should install

zypper in -y -t pattern devel_C_C++ 

I wrote the code to presumably work indefinitely with all openSUSE versions at that time and future versions like 15.2 with zero maintenance as long as the Leela project itself didn’t need new dependencies.
But, I haven’t inspected or maintained that code since it was submitted.
Unless a person had a reason to build from source, I wouldn’t recommend what I wrote, instead Malcolm built and is maintaining packages in the openSUSE repos which supports not just generic OpenBLAS (which is only what my code supports) but also both nVidia and AMD GPU computing.

But, the code I wrote might still be useful for someone who wants code that does unattended installs (or manual installs).

HTH,
TSU

Thank you for the info.