[MacPorts] #72549: nut-2.8.2_0.darwin_20.x86_64 fails to install from binary; but compiling it works (problem: Python Framework!)

MacPorts noreply at macports.org
Thu May 29 18:07:16 UTC 2025


#72549: nut-2.8.2_0.darwin_20.x86_64 fails to install from binary; but compiling it
works (problem: Python Framework!)
-----------------------------+--------------------
 Reporter:  GwynethLlewelyn  |      Owner:  (none)
     Type:  defect           |     Status:  new
 Priority:  Low              |  Milestone:
Component:  ports            |    Version:  2.10.7
 Keywords:  nut              |       Port:
-----------------------------+--------------------
 [https://networkupstools.org/ Network UPS Tools] (a.k.a. nut) fails to
 install directly from the port, although it compiles nicely from the
 sources

 The reason is simple to explain: the last maintainer (currently there is
 none) decided, very correctly, that it would be a great idea to include
 the Python 'helper' scripts & libraries to access the NUT servers.

 These are ''optional'' installs — not part of the main code tree — which
 are currently being offered on a separate `scripts` tree:
 https://github.com/networkupstools/nut/tree/master/scripts/python

 The current version allegedly works both with Python 2 and 3, but the port
 writer decided to use Python 2.7. This is not a problem ''per se'', but
 the issue is with the destination:


 {{{
 System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7
 /site-packages/PyNUT.py
 System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7
 /site-packages/test_nutclient.py
 }}}

 I forgot after which macOS version it became impossible to write anything
 on `System/Library`; I'm using macOS Big Sur (11.7.9 (20G1426)).

 By contrast, forcing a compilation from source, will have zero issues, as,
 in this case, the (correct) destination for the files was used instead:

 {{{
 opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7
 /site-packages/PyNUT.py
 opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7
 /site-packages/test_nutclient.py
 }}}

 Shouldn't be too hard to change; and, in the meantime, this ticket ought
 to help those stumbling across the same error.

 (Note: nut 2.8.3 is out, but, as said, this port has no maintainer)

 For the sake of completeness:

 {{{#!sh
 $ sudo port install nut
 --->  Computing dependencies for nut
 --->  Activating nut @2.8.2_0
 Error: Failed to activate nut: can't create directory
 "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7
 /site-packages": not owner
     while executing
 "::file mkdir $dir"
     (procedure "_activate_directories" line 9)
     invoked from within
 "_activate_directories $directories $extracted_dir"
     ("try" body line 3)
     while executing
 "throw [dict get $eOptions -errorcode] [dict get $eOptions -errorinfo]"
     ("try ... on" handler line 5)
     invoked from within
 "registry::write {
             # Activate it, and catch errors so we can roll-back

             try {
                 $port activate $imagefiles
       ..."
 Error: See
 /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_sysutils_nut/nut/main.log
 for details.
 Error: Follow https://guide.macports.org/#project.tickets if you believe
 there is a bug.
 Error: Processing of port nut failed
 }}}

-- 
Ticket URL: <https://trac.macports.org/ticket/72549>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list