メンテナンス・トラブルシュート - Python - python27-2.7.14_1 → 2.7.15

クラウディア 
1. 概要
2. 単独でインストールしてみる
3. 強引なやり方

1. 概要

 発生は 2018年5月14日。

> pkg version -vl "<"
python27-2.7.14_1                  <   needs updating (index has 2.7.15)
vim-8.0.1794                       <   needs updating (index has 8.0.1817)
 てなことになっているので

portupgrade -Rr python27
 すると途中で

===>   Registering installation for python27-2.7.15 as automatic
pkg-static: Unable to access file /usr/ports/lang/python27/work/stage/usr/local/lib/python2.7/lib-dynload/_ssl.so:No such file or directory
*** Error code 74

Stop.
make[2]: stopped in /usr/ports/lang/python27
*** Error code 1

Stop.
make[1]: stopped in /usr/ports/lang/python27
*** Error code 1

Stop.
make: stopped in /usr/ports/lang/python27
 てなことになって、最終的に

Extracting python27-2.7.14_1: 100%
Message from python27-2.7.14_1:

===========================================================================

Note that some standard Python modules are provided as separate ports
as they require additional dependencies. They are available as:

bsddb           databases/py-bsddb
gdbm            databases/py-gdbm
sqlite3         databases/py-sqlite3
tkinter         x11-toolkits/py-tkinter

===========================================================================
** Fix the installation problem and try again.
--->  Skipping 'editors/vim' (vim-8.0.1794) because a requisite package 'python27-2.7.14_1' (lang/python27) failed (specify -k to force)
** Listing the failed packages (-:ignored / *:skipped / !:failed)
	! lang/python27 (python27-2.7.14_1)	(install error)
	* editors/vim (vim-8.0.1794)
 というエラーになります。

2. 単独でインストールしてみる

 よくわからんので単独でインストールできるかやってみます。

プロンプト略
cd /usr/ports/lang/python27
make clean
make

	・・・略・・・

make deinstall
make install
===>  Installing for python27-2.7.15
===>  Checking if python27 already installed
===>   Registering installation for python27-2.7.15
pkg-static: Unable to access file /usr/ports/lang/python27/work/stage/usr/local/lib/python2.7/lib-dynload/_ssl.so:No such file or directory
*** Error code 74

Stop.
make[1]: stopped in /usr/ports/lang/python27
*** Error code 1

Stop.
make: stopped in /usr/ports/lang/python27
 やっぱりあかんかった。

3. 強引なやり方

 「Bug 210820 - lang/python27: _ssl.so fails to build (Undefined symbol "SSLv2_method") 」を参考にして。  強引なやり方で、あまりおすすめできるやり方ではありませんが・・・。  前項の流れのまま

> touch /usr/ports/lang/python27/work/stage/usr/local/lib/python2.7/lib-dynload/_ssl.so
> make install
===>  Installing for python27-2.7.15
===>  Checking if python27 already installed
===>   Registering installation for python27-2.7.15
Installing python27-2.7.15...
===========================================================================

Note that some standard Python modules are provided as separate ports
as they require additional dependencies. They are available as:

bsddb           databases/py-bsddb
gdbm            databases/py-gdbm
sqlite3         databases/py-sqlite3
tkinter         x11-toolkits/py-tkinter

===========================================================================

===> SECURITY REPORT:
      This port has installed the following files which may act as network
      servers and may therefore pose a remote security risk to the system.
/usr/local/lib/python2.7/lib-dynload/_socket.so

      If there are vulnerabilities in these programs there may be a security
      risk to the system. FreeBSD makes no guarantee about the security of
      ports included in the Ports Collection. Please type 'make deinstall'
      to deinstall the port if this is a concern.

      For more information, and contact details about the security
      status of this software, see the following webpage:
https://www.python.org/
 とまぁ、インストールはできました。  変な副作用が出なきゃいいんですが・・・。  念のためちゃんとインストールできているか確認

> /usr/local/bin/python2 --version
Python 2.7.15
 あとは様子見ですかねぇ。
ハイスピードプラン