pacman 업데이트 에러

오늘 msys2의 pacman 으로 시스템 업그레이드를 하려 하는데..
아래와 같이 에러가 나옴.

:: Synchronizing package databases...
downloading mingw32.db...
downloading mingw32.db.sig...
error: mingw32: key "4A6129F4E4B84AE46ED7F635628F528CF3053E04" is unknown
...

검색해보니 아래와 같이 처리 하라함. (참고: https://www.msys2.org/news/#2020-06-29-new-packagers)

# curl -O http://repo.msys2.org/msys/x86_64/msys2-keyring-r21.b39fb11-1-any.pkg.tar.xz
# curl -O http://repo.msys2.org/msys/x86_64/msys2-keyring-r21.b39fb11-1-any.pkg.tar.xz.sig
# pacman-key --verify msys2-keyring-r21.b39fb11-1-any.pkg.tar.xz{.sig,}
# pacman -U --config <(echo) msys2-keyring-r21.b39fb11-1-any.pkg.tar.xz
# rm -r /etc/pacman.d/gnupg/
# pacman-key --init
# pacman-key --populate msys2

다음 msys2 를 재시작.

Docker – none 컨테이너 삭제하기

$ docker images -a
REPOSITORY          TAG                 IMAGE ID            CREATED             SIZE
vpsdemop            latest              12473ad26899        2 minutes ago       1GB
<none>              <none>              84a6c05698e4        2 minutes ago       1GB
<none>              <none>              4011590a442e        3 minutes ago       1GB
<none>              <none>              fdf69123da65        3 minutes ago       1GB
...
<none>              <none>              b4a359727bd7        7 hours ago         112MB
ubuntu              20.04               1d622ef86b13        5 weeks ago         73.9MB
ubuntu              latest              1d622ef86b13        5 weeks ago         73.9MB

$ docker system prune
WARNING! This will remove:
        - all stopped containers
        - all networks not used by at least one container
        - all dangling images
        - all dangling build cache
Are you sure you want to continue? [y/N] y
Deleted Containers:
8df4735033ad6cedf4a3231368a99ab4e2121d717f6d025bf2773ff6c755e197
e923e2b8076739edbb33c6d5bb9864346d0ba6b7882df148bcc831f65cc9db98
...
deleted: sha256:97ee249f1d92e909be67962aaab947390273413854f6d710b0fb279e1917b36a
deleted: sha256:8b4f5330ef79a9b5b369a9168d45a49604d02761229edf60e1aa125cf4030530

Total reclaimed space: 5.38GB

$ docker images
REPOSITORY          TAG                 IMAGE ID            CREATED             SIZE
vpsdemop            latest              12473ad26899        3 minutes ago       1GB
ubuntu              20.04               1d622ef86b13        5 weeks ago         73.9MB
ubuntu              latest              1d622ef86b13        5 weeks ago         73.9MB

CentOS 7에 특정 버전의 Docker-CE 설치하기

$ yum remove docker docker-client docker-client-latest docker-common docker-latest                   docker-latest-logrotate docker-logrotate docker-engine
$ rm -rf /var/lib/docker/

$ sudo yum install -y yum-utils

$ yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
$ yum list docker-ce --showduplicates | sort -r
...
docker-ce.x86_64            3:19.03.4-3.el7                     docker-ce-stable
docker-ce.x86_64            3:19.03.3-3.el7                     docker-ce-stable
docker-ce.x86_64            3:19.03.2-3.el7                     docker-ce-stable
docker-ce.x86_64            3:19.03.1-3.el7                     docker-ce-stable
docker-ce.x86_64            3:19.03.11-3.el7                    docker-ce-stable
docker-ce.x86_64            3:19.03.10-3.el7                    docker-ce-stable
docker-ce.x86_64            3:19.03.0-3.el7                     docker-ce-stable
docker-ce.x86_64            3:18.09.9-3.el7                     docker-ce-stable
docker-ce.x86_64            3:18.09.8-3.el7                     docker-ce-stable
docker-ce.x86_64            3:18.09.7-3.el7                     docker-ce-stable
docker-ce.x86_64            3:18.09.6-3.el7                     docker-ce-stable
...

$ yum install docker-ce-18.09.9 docker-ce-cli-18.09.9

$ docker --version
Docker version 18.09.9, build 039a7df9ba

$ systemctl enable docker
Created symlink from /etc/systemd/system/multi-user.target.wants/docker.service to /usr/lib/systemd/system/docker.service.

$ systemctl start docker
$ systemctl status docker

Ubuntu 12.04 에 Python 3.7 설치하기

사실 python 에서 protobuf3 를 사용할려면..
최신의 protobuf3 버전이 현재 python 3.7용만 설치가 되는듯하다..
기본 Ubuntu 12.04는 python이.. 3.8..

암튼.. python 3.7을 설치하려면 아래와 같이 하면됨.

$ sudo add-apt-repository ppa:deadsnakes/ppa
$ sudo apt install python3.7
$ curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
$ python3.7 get-pip.py

$ vim ~/.bashrc
alias pip='/home/ihmin/.local/bin/pip3.7'
alias python='/usr/bin/python3.7'

$ python --version
Python 3.7.7

$ pip --version
pip 20.1.1 from /home/ihmin/.local/lib/python3.7/site-packages/pip (python 3.7)

pip로 설치된 package는 아래에 설치됨.

/home/ihmin/.local/lib/python3.7/site-packages

CentOS 6.x 에 Python 3 버전 설치하기

$ yum install -y https://repo.ius.io/ius-release-el6.rpm
$ yum install -y python36u python36u-libs python36u-devel python36u-pip
$ python3.6 -V
Python 3.6.8
$ rm -f /usr/bin/python3
$ ln -s /usr/bin/python3.6 /usr/bin/python3
$ python3
Python 3.6.8 (default, Aug 10 2019, 06:52:10) 
[GCC 4.4.7 20120313 (Red Hat 4.4.7-23)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> 

opencv4nodejs 설치

우선 opencv4nodejs 를 설치하려면..
당연히 visual studio 타 기타 개발 툴들이 정상적으로 설치되어 있어야한다..
근데 착하게도.. node.js 용 네이티브 모듈을 설치하는데 필요한 개발툴을 자동으로 깔아주는 모듈이 있음..

https://github.com/felixrieseberg/windows-build-tools

우선 cmd를 관리자권한으로 실행하고..
아래를 실행하면 python이나 vs 같은 개발툴이 자동으로 설치가 된다..

C:\> npm install --global windows-build-tools

다음 아래를 실행하면 node.js용 opencv가 설치됨.

C:\> npm i opencv4nodejs 

CentOS 6 gcc 버전 업데이트

$ yum install centos-release-scl-rh centos-release-scl
$ yum check-update
$ yum install devtoolset-7-gcc-c++
$ source /opt/rh/devtoolset-7/enable
$ gcc --version
gcc (GCC) 7.3.1 20180303 (Red Hat 7.3.1-5)
Copyright (C) 2017 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

아래도 가능..

yum install devtoolset-7-gcc-c++ (GCC 7.3.1)
yum install devtoolset-8-gcc-c++ (GCC 8.3.1)
yum install devtoolset-9-gcc-c++ (GCC 9.1.1)

아래와 같이 devtoolset-7-gcc-c++ 을 enable..

$ vim /etc/profile.d/enabledevtoolset-7.sh
#!/bin/bash
source /opt/rh/devtoolset-7/enable

LMDB

메모리에 통째로 올려 놓고 쓰는 작지만 아주 빠른 DB..
Key, Value 로 이루어진 심플한 DB..
쓰레드에 안전한 DB..
Fetch 시에 추가적인 시간이 들지 않는 빠른 DB.. (이미 메모리에 올려져있는 상태..)

http://www.lmdb.tech/
http://www.lmdb.tech/doc/index.html
https://github.com/LMDB/lmdb

자작 어플리케이션의 세션 저장용으로 쓰면 아주 좋을듯하다..
msys2의 pacman 패키지로도 설치 가능..