CONTENTS


Lastmodified 2022-07-01 (金) 08:23:01


python 3.6 to 3.7

python 3.6 で動作している212というサーバがあって、3.6から3.7へ以降したいので、

/etc/make.conf

DEFAULT_VERSIONS+=  perl5=5.28
#DEFAULT_VERSIONS+=  perl5=5.26
NO_SENDMAIL= true
#DEFAULT_VERSIONS+=python=3.6 pythonr3=3.6
DEFAULT_VERSIONS+=python=3.7 pythonr3=3.7
DEFAULT_VERSIONS+=ruby=2.6
pkg set -o lang/python36:lang/python37
Change origin from lang/python36 to lang/python37 for all dependencies? [y/N]: y

として、この段階では、

# pkg delete python36-3.6.9_3
Updating database digests format: 100%
Checking integrity... done (0 conflicting)
Deinstallation has been requested for the following 9 packages (of 0 packages in the universe):

Installed packages to be REMOVED:
        python36-3.6.9_3
        munin-node-2.0.52
        llvm80-8.0.1_3
        glib-2.56.3_6,1
        rrdtool-1.7.2_1
        harfbuzz-2.6.4
        pango-1.42.4_3
        cairo-1.16.0,2
        munin-master-2.0.52

Number of packages to be removed: 9

The operation will free 992 MiB.

Proceed with deinstalling packages? [y/N]:

となるが、

# pkg delete python37-3.7.6
Checking integrity... done (0 conflicting)
Deinstallation has been requested for the following 1 packages (of 0 packages in the universe):

Installed packages to be REMOVED:
        python37-3.7.6

Number of packages to be removed: 1

The operation will free 110 MiB.

Proceed with deinstalling packages? [y/N]:

となる。

https://www.freebsd.org/doc/ja_JP.eucJP/books/handbook/pkgng-intro.html

https://ja.stackoverflow.com/questions/53587/python%E3%81%AE%E3%83%87%E3%83%95%E3%82%A9%E3%83%AB%E3%83%88%E3%83%90%E3%83%BC%E3%82%B8%E3%83%A7%E3%83%B3%E3%82%923-7%E3%81%AB%E3%81%97%E3%81%9F%E3%81%84

/usr/local/sbin/portversion -vl'<' すると、

Ports tree is already up to date.
[Reading data from pkg(8) ... - 441 packages found - done]
help2man-1.47.11            <  needs updating (port has 1.47.12)
oniguruma-6.9.3             <  needs updating (port has 6.9.4)
python36-3.6.9_3            <  needs updating (port has 3.7.6)
vulnxml file up-to-date
0 problem(s) in 0 installed package(s) found.

portupgrade -arR (--batch)

すると、一番に python36 > python37 される模様。

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

py37-gdbm       databases/py-gdbm@py37
py37-sqlite3    databases/py-sqlite3@py37
py37-tkinter    x11-toolkits/py-tkinter@py37

ports/UPDATING には次のように書かれていますので、

```

 This may ease the upgrade for users of pre-build packages:
 # sh
 # for i in $(pkg query -g %n 'py36-*'); do pkg set -yn ${i}:py37-${i#py36-}; done
 # pkg upgrade

Performing sanity check on apache24 configuration: [Mon Jan 06 11:49:20.552895 2020] [php7:crit] [pid 12786:tid 34397577216] Apache is running a threaded MPM, but your PHP Module is not compiled to be threadsafe. You need to recompile PHP. AH00013: Pre-configuration failed

  994  11:14   postfix reload
  995  11:15   amavisd restart
  996  11:15   postfix reload
  997  11:15   cat /var/log/all.log
  998  11:15   history
  999  11:15   pkg info
 1000  11:17   sh
 1001  11:40   top
 1002  11:40   cat /var/log/all.log
 1003  11:41   cat /var/log/all.log
 1004  11:41   newaliases
 1005  11:42   pkg info
 1006  11:43   portinstall security/amavisd-new
 1007  11:47   portupgrade -rf amavisd-new-2.12.0,1
 1008  11:53   pkg delete perl5-5.28.2
 1009  11:53   cd /usr/ports/lang/perl5
 1010  11:53   cd /usr/ports/lang/
 1011  11:53   ll
 1012  11:54   cd perl5.28
 1013  11:54   make config
 1014  11:54   make deinistall
 1015  11:54   make deinstall
 1016  11:54   portupgrade -rf amavisd-new-2.12.0,1
 1017  12:01   portupgrade -rf php72-7.2.26
 1018  12:04   cd /usr/ports/lang/php72
 1019  12:04   ll
 1020  12:04   make install
 1021  12:04   make deinstall
 1022  12:05   portinstall lang/php72
 1023  12:05   pkg info
 1024  12:06   portupgrade -rf lang/php72
 1025  12:07   portupgrade -rf php72
 1026  12:07   portinstall lang/php72
 1027  12:07   make install clean
 1028  12:07   make deinstall
 1029  12:08   /usr/local/sbin/pkg-static info -g -Ea
 1030  12:09   portupgrade -f php72-extensions
 1031  12:10   /root/bin/check.sh
 1032  12:12   portupgrade -rf php72
 1033  12:12   pkg info
 1034  12:13   /root/bin/check.sh
 1035  12:15   /root/bin/check.sh
 1036  12:16   portsnap fetch update
 1037  12:17   portsnap extract
 1038  12:53   ll
 1039  12:55   make install
 1040  12:56   make deinstall
 1041  12:56   make reinstall
 1042  12:56   amke install -Force
 1043  12:56   make install -Force
 1044  12:57   make install -k
 1045  12:57   make install
 1046  12:57   pkg info
 1047  12:58   pkg install php72
 1048  12:59   cd
 1049  12:59   pkg info
 1050  12:59   portupgrade -rf php72-7.2.26
 1051  13:36   apachectl restart
 1052  13:36   pkg info
 1053  13:40   portupgrade apache24-2.4.41-rf
 1054  13:40   portupgrade -rf apache24-2.4.41
 1055  13:48   apachectl restart
 1056  13:49   portupgrade -rfR apache24-2.4.41
 1057  14:26   apachectl restart
 1058  14:28   pkg info
 1059  14:28   top
 1060  14:29   history

Total access 1426:本日 1:昨日 0

Counter: 1426, today: 1, yesterday: 0

トップ   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS