6. FreeBSD - メンテナンス・トラブルシュート - python - node.js

 
6.1 概要
6.2 python27 からインストールし直し

6.1 概要

 なかなか難しい問題になってきたのです。  「pkg・ports アップデート関連 - /etc/make.conf オプション」やら「pkg・ports アップデート関連 - perl5」からこちらへ行きついちゃったりしているはずです。  元はと言えば
/usr/ports/www/node
 のオプションの問題だったような。  そのせいて openssl-devel をインストールしたり、アンインストールしたり・・・。  でまぁ、オプションで  「BUNDLED_SSL」のチェックをつけていればよいのかと思って・・・


> cd /usr/ports/www/node
> make clean
> make
===>  License MIT accepted by the user
===>   node-10.1.0_1 depends on file: /usr/local/sbin/pkg - found
===> Fetching all distfiles required by node-10.1.0_1 for building
===>  Extracting for node-10.1.0_1
=> SHA256 Checksum OK for node-v10.1.0.tar.gz.
===>  Patching for node-10.1.0_1
===>  Applying FreeBSD patches for node-10.1.0_1
===>   node-10.1.0_1 depends on executable: gmake - found
===>   node-10.1.0_1 depends on file: /usr/local/bin/python2.7 - found
===>   node-10.1.0_1 depends on package: pkgconf>=1.3.0_1 - found
===>   node-10.1.0_1 depends on shared library: libcares.so - found (/usr/local/lib/libcares.so)
===>   node-10.1.0_1 depends on shared library: libuv.so - found (/usr/local/lib/libuv.so)
===>   node-10.1.0_1 depends on shared library: libicui18n.so - found (/usr/local/lib/libicui18n.so)
===>  Configuring for node-10.1.0_1
ERROR:root:code for hash md5 was not found.
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/hashlib.py", line 147, in <module>
    globals()[__func_name] = __get_hash(__func_name)
  File "/usr/local/lib/python2.7/hashlib.py", line 97, in __get_builtin_constructor
    raise ValueError('unsupported hash type ' + name)
ValueError: unsupported hash type md5
ERROR:root:code for hash sha1 was not found.
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/hashlib.py", line 147, in <module>
    globals()[__func_name] = __get_hash(__func_name)
  File "/usr/local/lib/python2.7/hashlib.py", line 97, in __get_builtin_constructor
    raise ValueError('unsupported hash type ' + name)
ValueError: unsupported hash type sha1
ERROR:root:code for hash sha224 was not found.
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/hashlib.py", line 147, in <module>
    globals()[__func_name] = __get_hash(__func_name)
  File "/usr/local/lib/python2.7/hashlib.py", line 97, in __get_builtin_constructor
    raise ValueError('unsupported hash type ' + name)
ValueError: unsupported hash type sha224
ERROR:root:code for hash sha256 was not found.
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/hashlib.py", line 147, in <module>
    globals()[__func_name] = __get_hash(__func_name)
  File "/usr/local/lib/python2.7/hashlib.py", line 97, in __get_builtin_constructor
    raise ValueError('unsupported hash type ' + name)
ValueError: unsupported hash type sha256
ERROR:root:code for hash sha384 was not found.
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/hashlib.py", line 147, in <module>
    globals()[__func_name] = __get_hash(__func_name)
  File "/usr/local/lib/python2.7/hashlib.py", line 97, in __get_builtin_constructor
    raise ValueError('unsupported hash type ' + name)
ValueError: unsupported hash type sha384
ERROR:root:code for hash sha512 was not found.
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/hashlib.py", line 147, in <module>
    globals()[__func_name] = __get_hash(__func_name)
  File "/usr/local/lib/python2.7/hashlib.py", line 97, in __get_builtin_constructor
    raise ValueError('unsupported hash type ' + name)
ValueError: unsupported hash type sha512
creating icu_config.gypi
{ 'target_defaults': { 'cflags': [],
                       'default_configuration': 'Release',
                       'defines': [],
                       'include_dirs': [ '/usr/local/include',
                                         '/usr/local/include',
                                         '/usr/local/include'],
                       'libraries': [ '-lz',
                                      '-L/usr/local/lib',
                                      '-luv',
                                      '-L/usr/local/lib',
                                      '-lcares',
                                      '-L/usr/local/lib',
                                      '-licui18n',
                                      '-licuuc',
                                      '-licudata']},
  'variables': { 'asan': 0,
                 'build_v8_with_gn': 'false',
                 'coverage': 'false',
                 'debug_http2': 'false',
                 'debug_nghttp2': 'false',
                 'force_dynamic_crt': 0,
                 'host_arch': 'x64',
                 'icu_gyp_path': 'tools/icu/icu-system.gyp',
                 'icu_small': 'false',
                 'llvm_version': '4.0',
                 'node_byteorder': 'little',
                 'node_debug_lib': 'false',
                 'node_enable_d8': 'false',
                 'node_enable_v8_vtunejit': 'false',
                 'node_install_npm': 'false',
                 'node_module_version': 64,
                 'node_no_browser_globals': 'false',
                 'node_prefix': '/usr/local',
                 'node_release_urlbase': '',
                 'node_shared': 'false',
                 'node_shared_cares': 'true',
                 'node_shared_http_parser': 'false',
                 'node_shared_libuv': 'true',
                 'node_shared_nghttp2': 'false',
                 'node_shared_openssl': 'false',
                 'node_shared_zlib': 'true',
                 'node_tag': '',
                 'node_target_type': 'executable',
                 'node_use_bundled_v8': 'true',
                 'node_use_dtrace': 'true',
                 'node_use_etw': 'false',
                 'node_use_openssl': 'true',
                 'node_use_perfctr': 'false',
                 'node_use_v8_platform': 'true',
                 'node_without_node_options': 'false',
                 'openssl_fips': '',
                 'openssl_no_asm': 0,
                 'shlib_suffix': 'so.64',
                 'target_arch': 'x64',
                 'v8_enable_gdbjit': 0,
                 'v8_enable_i18n_support': 1,
                 'v8_enable_inspector': 1,
                 'v8_no_strict_aliasing': 1,
                 'v8_optimized_debug': 0,
                 'v8_promise_internal_field_count': 1,
                 'v8_random_seed': 0,
                 'v8_trace_maps': 0,
                 'v8_typed_array_max_size_in_heap': 0,
                 'v8_use_snapshot': 'true',
                 'want_separate_host_toolset': 0}}
creating config.gypi
creating config.mk
Traceback (most recent call last):
  File "./configure", line 1558, in <module>
    run_gyp(gyp_args)
  File "tools/gyp_node.py", line 53, in run_gyp
    rc = gyp.main(args)
  File "tools/gyp/pylib/gyp/__init__.py", line 538, in main
    return gyp_main(args)
  File "tools/gyp/pylib/gyp/__init__.py", line 523, in gyp_main
    generator.GenerateOutput(flat_list, targets, data, params)
  File "tools/gyp/pylib/gyp/generator/make.py", line 2179, in GenerateOutput
    part_of_all=qualified_target in needed_targets)
  File "tools/gyp/pylib/gyp/generator/make.py", line 771, in Write
    extra_mac_bundle_resources, part_of_all)
  File "tools/gyp/pylib/gyp/generator/make.py", line 955, in WriteActions
    part_of_all=part_of_all, command=name)
  File "tools/gyp/pylib/gyp/generator/make.py", line 1701, in WriteDoCmd
    force = True)
  File "tools/gyp/pylib/gyp/generator/make.py", line 1756, in WriteMakeRule
    cmddigest = hashlib.sha1(command if command else self.target).hexdigest()
AttributeError: 'module' object has no attribute 'sha1'
===>  Script "configure" failed unexpectedly.
Please report the problem to bhughes@FreeBSD.org [maintainer] and attach the
"/usr/ports/www/node/work/node-v10.1.0/config.log" including the output of
the failure of your make command. Also, it might be a good idea to provide
an overview of all packages installed on your system (e.g. a
/usr/local/sbin/pkg-static info -g -Ea).
*** Error code 1

Stop.
make[1]: stopped in /usr/ports/www/node
*** Error code 1

Stop.
make: stopped in /usr/ports/www/node

6.2 python27 からインストールし直し

 うむぅ。python27 から入れ直すこととします。

> cd /usr/ports/lang/python27
> make clean
> make
> make deinstall
> make install
> cd /usr/ports/www/node
> make clean
> make
> make deinstall
> make install
 これでやっと収まりがついたようです。