Learn about Centmin Mod LEMP Stack today
Register Now

Getting Borgmatic running on Centos 7

Discussion in 'System Administration' started by ElChorizo, May 24, 2021.

  1. ElChorizo

    ElChorizo Premium Member Premium Member

    13
    1
    3
    Apr 29, 2021
    Ratings:
    +2
    Local Time:
    3:45 AM
    1.19.10
    10.3.28
    I prefer to use borgmatic to handle my backups but I am used to running it on Ubuntu. I attempted to install it today and it is in the EPEL repo but it fails to run. Apparently there is a known bug with a python dependency.


    To replicate simply install borgmatic and you'll get this error

    Code:
    
    /bin/borgmatic
    Traceback (most recent call last):
      File "/usr/local/lib/python3.6/site-packages/pkg_resources/__init__.py", line 568, in _build_master
        ws.require(__requires__)
      File "/usr/local/lib/python3.6/site-packages/pkg_resources/__init__.py", line 886, in require
        needed = self.resolve(parse_requirements(requirements))
      File "/usr/local/lib/python3.6/site-packages/pkg_resources/__init__.py", line 777, in resolve
        raise VersionConflict(dist, req).with_context(dependent_req)
    pkg_resources.ContextualVersionConflict: (ruamel.yaml 0.17.4 (/usr/lib/python3.6/site-packages), Requirement.parse('ruamel.yaml<=0.15'), {'borgmatic'})
    
    During handling of the above exception, another exception occurred:
    
    Traceback (most recent call last):
      File "/bin/borgmatic", line 6, in <module>
        from pkg_resources import load_entry_point
      File "/usr/local/lib/python3.6/site-packages/pkg_resources/__init__.py", line 3242, in <module>
        @_call_aside
      File "/usr/local/lib/python3.6/site-packages/pkg_resources/__init__.py", line 3226, in _call_aside
        f(*args, **kwargs)
      File "/usr/local/lib/python3.6/site-packages/pkg_resources/__init__.py", line 3255, in _initialize_master_working_set
        working_set = WorkingSet._build_master()
      File "/usr/local/lib/python3.6/site-packages/pkg_resources/__init__.py", line 570, in _build_master
        return cls._build_from_requirements(__requires__)
      File "/usr/local/lib/python3.6/site-packages/pkg_resources/__init__.py", line 583, in _build_from_requirements
        dists = ws.resolve(reqs, Environment())
      File "/usr/local/lib/python3.6/site-packages/pkg_resources/__init__.py", line 772, in resolve
        raise DistributionNotFound(req, requirers)
    pkg_resources.DistributionNotFound: The 'ruamel.yaml<=0.15' distribution was not found and is required by borgmatic
    
    There is a binary release on github but running that binary release gives a libz error as well.

    Code:
    /usr/local/bin/generate-borgmatic-config: error while loading shared libraries: libz.so.1: failed to map segment from shared object: Operation not permitted
    
    Anyone have any ideas how to get this to work on Centos 7?
     
  2. eva2000

    eva2000 Administrator Staff Member

    46,851
    10,627
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +16,493
    Local Time:
    6:45 PM
    Nginx 1.19.x
    MariaDB 5.5/10.x
  3. eva2000

    eva2000 Administrator Staff Member

    46,851
    10,627
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +16,493
    Local Time:
    6:45 PM
    Nginx 1.19.x
    MariaDB 5.5/10.x
    Last edited: May 24, 2021
  4. ElChorizo

    ElChorizo Premium Member Premium Member

    13
    1
    3
    Apr 29, 2021
    Ratings:
    +2
    Local Time:
    3:45 AM
    1.19.10
    10.3.28
    So if I install those it will run, or will it break other things? I'm learning Centos as I go and don't want to break anything.
     
  5. ElChorizo

    ElChorizo Premium Member Premium Member

    13
    1
    3
    Apr 29, 2021
    Ratings:
    +2
    Local Time:
    3:45 AM
    1.19.10
    10.3.28
    I was able to do it with pip3 and it seems to be working good. That works good enough for me.