小记一下这两天更新服务器版本遇到的各种问题。

服务器系统: Gentoo

第一天

其实本来不打算更新系统的,因为最近想试试免费的SSL证书,于是自然而然搜到了letsencrypt,跟着他们的流程需要安装

$ sudo emerge -av app-crypt/certbot app-crypt/certbot-nginx

运行了下,结果给出的错误是:

!!! The following installed packages are masked:
- sys-devel/gcc-4.4.::gentoo (masked by: package.mask)
/usr/portage/profiles/package.mask:
# Michał Górny <mgorny@gentoo.org>, Andreas K. Hüttel <dilfridge@gentoo.org>,
# Matthias Maier <tamiko@gentoo.org> ( May and later updates)
# These old versions of toolchain packages (binutils, gcc, glibc) are no
# longer officially supported and are not suitable for general use. Using
# these packages can result in build failures (and possible breakage) for
# many packages, and may leave your system vulnerable to known security
# exploits.
# If you still use one of these old toolchain packages, please upgrade (and
# switch the compiler / the binutils) ASAP. If you need them for a specific
# (isolated) use case, feel free to unmask them on your system. - sys-libs/glibc-2.23-r3::gentoo (masked by: package.mask)
- dev-perl/DBD-mysql-4.41.::gentoo (masked by: package.mask)
/usr/portage/profiles/package.mask:
# Kent Fredric <kentnl@gentoo.org> ( May )
# Subject to Man-in-the-middle security bypass vulnerability.
# Retained in tree only for users who need older versions
# for compatibility reasons.
# Bug: # - sys-devel/gcc-4.5.::gentoo (masked by: package.mask)
- sys-devel/binutils-2.26.::gentoo (masked by: package.mask)
For more information, see the MASKED PACKAGES section in the emerge
man page or refer to the Gentoo Handbook.

看到这个错误我还是懵的状态,不懂什么意思,然后网上一通乱搜之后,糊里糊涂的觉得是不是应该更新一下portage树,于是运行如下命令:

$ sudo emerge --sync
$ sudo emerge --depclean
$ sudo emerge --update --newuse --deep --with-bdeps=y @world

前两个命令没有报错,最后一个命令肯定是没成功的,但是的错误信息跟之前的类似,意思就是要我去更新Protage版本。

第二天

又开始来折腾了,我这不达目的不罢休的精神也是可嘉。

网上开始搜索如何更新portage

$ sudo emerge -1v portage

打开man emerge, -l 的选项意思如下

   --changelog (-l)

              Use this in conjunction with the --pretend option.  This will  show  the

              ChangeLog entries for all the packages that will be upgraded.

 


上面命令的结果还是关于 EAPI

!!! Repository 'x-portage' is missing masters attribute in '/usr/local/portage/metadata/layout.conf'
!!! Set 'masters = gentoo' in this file for future compatibility * IMPORTANT: 5 news items need reading for repository 'gentoo'.
* Use eselect news read to view new items. These are the packages that would be merged, in order: Calculating dependencies... done! !!! All ebuilds that could satisfy "app-eselect/eselect-pinentry" have been masked.
!!! One of the following masked packages is required to complete your request:
- app-eselect/eselect-pinentry-0.7::gentoo (masked by: EAPI 7) The current version of portage supports EAPI '6'. You must upgrade to a
newer version of portage before EAPI masked packages can be installed.
(dependency required by "app-crypt/pinentry-1.1.0-r2::gentoo" [ebuild])
(dependency required by "app-crypt/gnupg-2.2.10::gentoo" [ebuild])
(dependency required by "sys-apps/portage-2.3.51-r1::gentoo[-build,rsync-verify]" [ebuild])
(dependency required by "portage" [argument])
For more information, see the MASKED PACKAGES section in the emerge
man page or refer to the Gentoo Handbook.

参考了https://forums.gentoo.org/viewtopic-t-1087032.html?sid=fc9d72cb8cbb9deac2142bfa542cc06f,照着运行了下面四个命令

sudo emerge --sync
sudo emerge -qav python
sudo USE='-rsync-verify' emerge -qavO portage
sudo emerge -qav portage

第一个命令没有什么知道参考的结果,下面从第二个命令开始

$ sudo emerge -qav python

  

这一步虽然有warning消息提示我有几个package被masked了,但是最终python还是安装成功了,结果如下:

Password:
!!! Repository 'x-portage' is missing masters attribute in '/usr/local/portage/metadata/layout.conf'
!!! Set 'masters = gentoo' in this file for future compatibility * IMPORTANT: 5 news items need reading for repository 'gentoo'.
* Use eselect news read to view new items. [ebuild U ] sys-devel/automake-1.15.1-r2 [1.15] USE="{-test%}"
[ebuild NS ] dev-lang/python-3.6.5 [2.7.14-r1, 3.1.3-r1, 3.4.5-r1] USE="gdbm ipv6 ncurses readline sqlite ssl (threads) xml -build -examples -hardened -libressl {-test} -tk -wininst" !!! The following installed packages are masked:
- sys-devel/gcc-4.8.5::gentoo (masked by: package.mask)
/usr/portage/profiles/releases/17.0/package.mask:
# Andreas K. Huettel <dilfridge@gentoo.org> (27 May 2017)
# In the 17.0 profiles we assume that our system compiler uses C++14
# or later as default language setting. This means it has to be at
# least GCC 6. If you need an older compiler for specific purposes,
# feel free to unmask it, however, using it for normal emerging of
# packages is neither recommended nor supported in any way. - sys-devel/binutils-2.29.1-r1::gentoo (masked by: package.mask)
/usr/portage/profiles/package.mask:
# Michał Górny <mgorny@gentoo.org>, Andreas K. Hüttel <dilfridge@gentoo.org>,
# Matthias Maier <tamiko@gentoo.org> (21 May 2017 and later updates)
# These old versions of toolchain packages (binutils, gcc, glibc) are no
# longer officially supported and are not suitable for general use. Using
# these packages can result in build failures (and possible breakage) for
# many packages, and may leave your system vulnerable to known security
# exploits.
# If you still use one of these old toolchain packages, please upgrade (and
# switch the compiler / the binutils) ASAP. If you need them for a specific
# (isolated) use case, feel free to unmask them on your system. - sys-devel/gcc-4.5.4::gentoo (masked by: package.mask)
- sys-libs/glibc-2.25-r10::gentoo (masked by: package.mask)
For more information, see the MASKED PACKAGES section in the emerge
man page or refer to the Gentoo Handbook. Would you like to merge these packages? [Yes/No] yes
>>> Recording dev-lang/python in "world" favorites file...
>>> Verifying ebuild manifests
>>> Emerging (1 of 2) sys-devel/automake-1.15.1-r2::gentoo
>>> Installing (1 of 2) sys-devel/automake-1.15.1-r2::gentoo
>>> Emerging (2 of 2) dev-lang/python-3.6.5::gentoo
>>> Installing (2 of 2) dev-lang/python-3.6.5::gentoo
>>> Jobs: 2 of 2 complete Load avg: 2.01, 1.30, 0.63 * Messages for package dev-lang/python-3.6.5: * You have just upgraded from an older version of Python.
*
* Please adjust PYTHON_TARGETS (if so desired), and run emerge with the --newuse or --changed-use option to rebuild packages installing python modules. !!! existing preserved libs found * IMPORTANT: 5 news items need reading for repository 'gentoo'.
* Use eselect news read to view new items.

然后运行

sudo USE='-rsync-verify' emerge -qavO portage

  

结果如下,没有报错:

Password:
!!! Repository 'x-portage' is missing masters attribute in '/usr/local/portage/metadata/layout.conf'
!!! Set 'masters = gentoo' in this file for future compatibility * IMPORTANT: 5 news items need reading for repository 'gentoo'.
* Use eselect news read to view new items. [ebuild U ] sys-apps/portage-2.3.51-r1 [2.3.3] USE="(ipc) native-extensions xattr -build -doc -epydoc -gentoo-dev% -rsync-verify% (-selinux) (-linguas_ru%)" PYTHON_TARGETS="python2_7 python3_6* (-pypy) -python3_4* -python3_5 (-python3_7)" Would you like to merge these packages? [Yes/No] yes
>>> Verifying ebuild manifests
>>> Emerging (1 of 1) sys-apps/portage-2.3.51-r1::gentoo
>>> Installing (1 of 1) sys-apps/portage-2.3.51-r1::gentoo
>>> Jobs: 1 of 1 complete Load avg: 1.41, 1.14, 0.67 !!! existing preserved libs found * IMPORTANT: 5 news items need reading for repository 'gentoo'.
* Use eselect news read to view new items.

  

继续运行最后一步:

$ sudo emerge -qav portage

完整结果输出如下:

!!! Repository 'x-portage' is missing masters attribute in '/usr/local/portage/metadata/layout.conf'
!!! Set 'masters = gentoo' in this file for future compatibility * IMPORTANT: 5 news items need reading for repository 'gentoo'.
* Use eselect news read to view new items. [ebuild N ] app-crypt/openpgp-keys-gentoo-release-20190102 USE="-test"
[ebuild N ] dev-libs/libunistring-0.9.10 USE="-doc -static-libs"
[ebuild U ] dev-libs/libgpg-error-1.29 [1.10] USE="nls -common-lisp -static-libs"
[ebuild N ] dev-libs/libassuan-2.5.1 USE="-static-libs"
[ebuild N ] dev-libs/libksba-1.3.5-r1 USE="-static-libs"
[ebuild N ] app-eselect/eselect-lib-bin-symlink-0.1.1
[ebuild N ] app-eselect/eselect-pinentry-0.7
[ebuild N ] dev-libs/libtasn1-4.13 USE="-doc -static-libs -test -valgrind"
[ebuild N ] net-dns/libidn2-2.0.4 USE="-static-libs"
[ebuild U ] dev-libs/libgcrypt-1.8.3 [1.4.6] USE="-doc% -o-flag-munging% -static-libs"
[ebuild N ] dev-libs/nettle-3.4 USE="gmp -doc (-neon) -static-libs -test" CPU_FLAGS_X86="-aes"
[ebuild N ] net-libs/gnutls-3.5.19 USE="cxx idn nls openssl seccomp tls-heartbeat zlib -dane -doc -examples -guile -openpgp -pkcs11 -sslv2 -sslv3 -static-libs -test (-test-full) -tools -valgrind"
[ebuild N ] app-crypt/pinentry-1.1.0-r2 USE="ncurses -caps -emacs -fltk -gnome-keyring -gtk -qt5 -static"
[ebuild N ] dev-python/bz2file-0.98 PYTHON_TARGETS="python2_7 (-pypy)"
[ebuild N ] app-crypt/gnupg-2.2.10 USE="bzip2 nls readline smartcard ssl -doc -ldap (-selinux) -tofu -tools -usb -wks-server"
[ebuild U ] dev-python/setuptools-40.6.3 [30.4.0] USE="-test" PYTHON_TARGETS="python2_7 python3_6* (-pypy) (-pypy3) -python3_4* -python3_5 (-python3_7)"
[ebuild U ] dev-python/certifi-2018.4.16 [2016.9.26] PYTHON_TARGETS="python2_7 python3_6* (-pypy) (-pypy3) -python3_4* -python3_5 (-python3_7)"
[ebuild N ] dev-python/pyblake2-1.1.2 PYTHON_TARGETS="python2_7 python3_6 (-pypy) (-pypy3) -python3_4 -python3_5 (-python3_7)"
[ebuild N ] app-portage/gemato-14.0 USE="blake2 bzip2 gpg -lzma -sha3 -test -tools" PYTHON_TARGETS="python2_7 python3_6 (-pypy) -python3_4 -python3_5 (-python3_7)"
[ebuild R ] sys-apps/portage-2.3.51-r1 USE="(ipc) native-extensions rsync-verify* xattr -build -doc -epydoc -gentoo-dev (-selinux)" PYTHON_TARGETS="python2_7 python3_6 (-pypy) -python3_4 -python3_5 (-python3_7)" !!! Multiple package instances within a single package slot have been pulled
!!! into the dependency graph, resulting in a slot conflict: dev-python/setuptools:0 (dev-python/setuptools-40.6.3:0/0::gentoo, ebuild scheduled for merge) pulled in by
>=dev-python/setuptools-34[python_targets_pypy(-)?,python_targets_python2_7(-)?,python_targets_python3_4(-)?,python_targets_python3_5(-)?,python_targets_python3_6(-)?,python_targets_python3_7(-)?,-python_single_target_pypy(-),-python_single_target_python2_7(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-),-python_single_target_python3_6(-),-python_single_target_python3_7(-)] required by (app-portage/gemato-14.0:0/0::gentoo, ebuild scheduled for merge)
^^ ^^
dev-python/setuptools[python_targets_pypy(-)?,python_targets_pypy3(-)?,python_targets_python2_7(-)?,python_targets_python3_4(-)?,python_targets_python3_5(-)?,python_targets_python3_6(-)?,python_targets_python3_7(-)?,-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python2_7(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-),-python_single_target_python3_6(-),-python_single_target_python3_7(-)] required by (dev-python/pyblake2-1.1.2:0/0::gentoo, ebuild scheduled for merge) dev-python/setuptools[python_targets_pypy(-)?,python_targets_pypy3(-)?,python_targets_python2_7(-)?,python_targets_python3_4(-)?,python_targets_python3_5(-)?,python_targets_python3_6(-)?,python_targets_python3_7(-)?,-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python2_7(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-),-python_single_target_python3_6(-),-python_single_target_python3_7(-)] required by (dev-python/certifi-2018.4.16:0/0::gentoo, ebuild scheduled for merge) dev-python/setuptools[python_targets_pypy(-)?,python_targets_python2_7(-)?,python_targets_python3_4(-)?,python_targets_python3_5(-)?,python_targets_python3_6(-)?,python_targets_python3_7(-)?,-python_single_target_pypy(-),-python_single_target_python2_7(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-),-python_single_target_python3_6(-),-python_single_target_python3_7(-)] required by (app-portage/gemato-14.0:0/0::gentoo, ebuild scheduled for merge) (dev-python/setuptools-30.4.0:0/0::gentoo, installed) pulled in by
dev-python/setuptools[python_targets_python2_7(-),python_targets_python3_4(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python2_7(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-),-python_single_target_python3_6(-)] required by (dev-python/certifi-2016.9.26:0/0::gentoo, installed) dev-python/setuptools[python_targets_python2_7(-),python_targets_python3_4(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python2_7(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-),-python_single_target_python3_6(-)] required by (dev-python/chardet-2.3.0:0/0::gentoo, installed) dev-python/setuptools[python_targets_python2_7(-),python_targets_python3_4(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python2_7(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-),-python_single_target_python3_6(-)] required by (dev-python/cryptography-1.7.1:0/0::gentoo, installed) >=dev-python/setuptools-18.2[python_targets_pypy(-)?,python_targets_pypy3(-)?,python_targets_python2_7(-)?,python_targets_python3_4(-)?,python_targets_python3_5(-)?,python_targets_python3_6(-)?,-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python2_7(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-),-python_single_target_python3_6(-)] required by (dev-python/pip-7.1.2:0/0::gentoo, installed) dev-python/certifi:0 (dev-python/certifi-2018.4.16:0/0::gentoo, ebuild scheduled for merge) pulled in by
>=dev-python/certifi-2016.9.26[python_targets_pypy(-)?,python_targets_pypy3(-)?,python_targets_python2_7(-)?,python_targets_python3_4(-)?,python_targets_python3_5(-)?,python_targets_python3_6(-)?,python_targets_python3_7(-)?,-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python2_7(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-),-python_single_target_python3_6(-),-python_single_target_python3_7(-)] required by (dev-python/setuptools-40.6.3:0/0::gentoo, ebuild scheduled for merge) (dev-python/certifi-2016.9.26:0/0::gentoo, installed) pulled in by
dev-python/certifi[python_targets_python2_7(-),python_targets_python3_4(-),-python_single_target_pypy(-),-python_single_target_python2_7(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-),-python_single_target_python3_6(-)] required by (dev-python/urllib3-1.16:0/0::gentoo, installed) >=dev-python/certifi-2016.9.26[python_targets_python2_7(-),python_targets_python3_4(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python2_7(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-),-python_single_target_python3_6(-)] required by (dev-python/setuptools-30.4.0:0/0::gentoo, installed) !!! The following installed packages are masked:
- sys-libs/glibc-2.25-r10::gentoo (masked by: package.mask)
/usr/portage/profiles/package.mask:
# Michał Górny <mgorny@gentoo.org>, Andreas K. Hüttel <dilfridge@gentoo.org>,
# Matthias Maier <tamiko@gentoo.org> (21 May 2017 and later updates)
# These old versions of toolchain packages (binutils, gcc, glibc) are no
# longer officially supported and are not suitable for general use. Using
# these packages can result in build failures (and possible breakage) for
# many packages, and may leave your system vulnerable to known security
# exploits.
# If you still use one of these old toolchain packages, please upgrade (and
# switch the compiler / the binutils) ASAP. If you need them for a specific
# (isolated) use case, feel free to unmask them on your system. - sys-devel/gcc-4.5.4::gentoo (masked by: package.mask)
- sys-devel/gcc-4.8.5::gentoo (masked by: package.mask)
- sys-devel/binutils-2.29.1-r1::gentoo (masked by: package.mask)
For more information, see the MASKED PACKAGES section in the emerge
man page or refer to the Gentoo Handbook.

上面的错误信息我先关注到的点是:

!!! The following installed packages are masked:
- sys-libs/glibc-2.25-r10::gentoo (masked by: package.mask)  

mask的意思如下:

package.mask

The package.mask file primarily blocks the use of  packages  that  cause

problems  or  are known to have issues on different systems.  It resides

in /usr/portage/profiles.

所以可能是这个包太旧了,过期了,所以我就更新了这个包

sudo emerge sys-libs/glibc

上述命令运行结果如下:

Calculating dependencies... done!
[ebuild U ] sys-libs/glibc-2.27-r6 [2.25-r10] USE="multiarch%* (-compile-locales) -doc%"
[blocks B ] <sys-devel/bison-2.7 ("<sys-devel/bison-2.7" is blocking sys-libs/glibc-2.27-r6) * Error: The above package list contains packages which cannot be
* installed at the same time on the same system. (sys-devel/bison-2.4.2:0/0::gentoo, installed) pulled in by
sys-devel/bison required by (sys-apps/iproute2-3.8.0:0/0::gentoo, installed)
sys-devel/bison required by (app-admin/sudo-1.8.1_p2:0/0::gentoo, installed)
>=sys-devel/bison-1.875 required by (sys-devel/gcc-6.4.0-r1:6.4.0/6.4.0::gentoo, installed)
>=sys-devel/bison-1.875 required by (sys-devel/gcc-4.5.4:4.5.4/4.5.4::gentoo, installed)
sys-devel/bison required by (virtual/yacc-0:0/0::gentoo, installed)
sys-devel/bison required by (dev-db/postgresql-9.0.5:9.0/9.0::gentoo, installed)
>=sys-devel/bison-1.875 required by (sys-devel/gcc-4.8.5:4.8.5/4.8.5::gentoo, installed)
sys-devel/bison required by (sys-libs/glibc-2.27-r6:2.2/2.2::gentoo, ebuild scheduled for merge) (sys-libs/glibc-2.27-r6:2.2/2.2::gentoo, ebuild scheduled for merge) pulled in by
>=sys-libs/glibc-2.6 required by (sys-libs/e2fsprogs-libs-1.41.14:0/0::gentoo, installed)
>=sys-libs/glibc-2.8 required by (sys-devel/gcc-4.8.5:4.8.5/4.8.5::gentoo, installed)
>=sys-libs/glibc-2.7 required by (sys-apps/iproute2-3.8.0:0/0::gentoo, installed)
>=sys-libs/glibc-2.9 required by (sys-fs/udev-151-r4:0/0::gentoo, installed)
>=sys-libs/glibc-2.8 required by (sys-devel/gcc-4.5.4:4.5.4/4.5.4::gentoo, installed)
sys-libs/glibc
sys-libs/glibc required by @selected
>=sys-libs/glibc-2.13 required by (sys-devel/gcc-6.4.0-r1:6.4.0/6.4.0::gentoo, installed)
>=sys-libs/glibc-2.9_p20081201 required by (dev-libs/libev-4.23:0/0::gentoo, installed)
sys-libs/glibc required by (dev-java/sun-jdk-1.6.0.29:1.6/1.6::gentoo, installed)
>=sys-libs/glibc-2.7 required by (sys-libs/pam-1.1.3:0/0::gentoo, installed)
sys-libs/glibc:2.2 required by (virtual/libc-0:0/0::gentoo, installed) For more information about Blocked Packages, please refer to the following
section of the Gentoo Linux x86 Handbook (architecture is irrelevant): https://wiki.gentoo.org/wiki/Handbook:X86/Working/Portage#Blocked_packages !!! The following installed packages are masked:
- sys-devel/gcc-4.5.4::gentoo (masked by: package.mask)
/usr/portage/profiles/package.mask:
# Michał Górny <mgorny@gentoo.org>, Andreas K. Hüttel <dilfridge@gentoo.org>,
# Matthias Maier <tamiko@gentoo.org> (21 May 2017 and later updates)
# These old versions of toolchain packages (binutils, gcc, glibc) are no
# longer officially supported and are not suitable for general use. Using
# these packages can result in build failures (and possible breakage) for
# many packages, and may leave your system vulnerable to known security
# exploits.
# If you still use one of these old toolchain packages, please upgrade (and
# switch the compiler / the binutils) ASAP. If you need them for a specific
# (isolated) use case, feel free to unmask them on your system. - sys-devel/gcc-4.8.5::gentoo (masked by: package.mask)
- sys-devel/binutils-2.29.1-r1::gentoo (masked by: package.mask)
For more information, see the MASKED PACKAGES section in the emerge
man page or refer to the Gentoo Handbook.

红色标注的话意思是想要安装的包被 sys-devel/bison-2.7 给阻塞了,所以我打算先更新 sys-devel/bison

sudo emerge sys-devel/bison

  

上面命令运行没报错,bison更新完了,那再次更新 glibc

sudo emerge sys-libs/glibc

  

Gentoo更新portage记录的更多相关文章

  1. 使用hibernate更新数据库记录的信息的相关学习记录

    截选代码(可能遗漏标点符号): package name.sql; import java.util.List; import name.session.HibernateSessionFactory ...

  2. MySQL 并行复制(MTS) 从库更新的记录不存在实际却存在

    目录 背景 版本 分析 测试 背景 开了并行复制的半同步从库SQL 线程报1032错误,异步复制从库没有报错,偶尔会出现这种 版本 mysql 5.7.16 redhat 6.8 mysql> ...

  3. 关于EntityFramework 更新数据记录时字段全部更新问题和不从数据库中获取直接更新记录

    一.一直对这个比较疑惑感觉只修改一条数据记录的一个字段结果更新Savechages后跟踪生成sql竟然是全部被修改,感觉微软怎么这么傻,总觉得会有其它方式可以只更新部分字段,但一直没有找到相关设置,最 ...

  4. Code First 更新数据库 记录

    每次都会忘记这个,所以记录一下 第一步:打开程序包管理控制台 第二步:启动迁移配置 第三步: 更新数据库的迁移的名称 因为设置了多个context,所以要指定更新的是哪一个库. 如果没有指定,会出现下 ...

  5. ElasticSearch5.0+版本分词热更新实践记录

    前言 刚开始接触ElasticSearch的时候,版本才是2.3.4,短短的时间,现在都更新到5.0+版本了.分词和head插件好像用法也不一样了,本博客记录如何配置Elasticsearch的Hea ...

  6. 更新portage之后 安装 certbot

    运行的时候一直报如下的错误: sudo certbot 错误结果: Traceback (most recent call last): File "/usr/lib/python-exec ...

  7. MongoDB数据库,一些的筛选过滤查询操作和db.updae()更新数据库记录遇到的坑。

    缘由:使用MongoDB时遇到一些需要查询/更新操作指定某些字段的业务场景 查询和更新指定字段就需要进行简单的筛选和过滤,也能在大数据量时减少查询消耗时间 1. 查询数据库某些指定字段,同时默认返回_ ...

  8. [技术干货-算子使用] Mindspore 控制流中存在原地更新操作类副作用算子时循环值不更新问题记录

    关于mindspore 原地更新类算子的一点思考记录如下: 现象记录: 原始测试代码 错误结果复现: 分析: 如果在场景中加入42行的copy()操作此时cpu的结果就会正确,但是gpu的结果则不受c ...

  9. C# txt格式记录时间,时间对比,决定是否更新代码记录Demo

    using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.I ...

随机推荐

  1. 如何快速将vc++的类转换为c#/cli

    所有需要的工具: 1. TextTemplate 2. P/Invoke Interop Assistant 3. DotNetResolver vc++的native类一般是无法直接暴露在.net环 ...

  2. jzoj5989. 【北大2019冬令营模拟2019.1.6】Forest (set)

    题面 题解 为了一点小细节卡了一个下午--我都怕我瞎用set把电脑搞炸-- 观察一次\(1\)操作会造成什么影响,比如说把\(A[i]\)从\(x\)改成\(y\): \(D[x]\)会\(-1\), ...

  3. jzoj5983. 【北大2019冬令营模拟2019.1.1】多边形 (组合数学)

    这其实是道打表题--你看我代码就知道了-- 咳咳来点严谨证明好了-- 前方高能请注意 首先,正多边形近似于圆,可以看做在圆里内接多边形.圆内接多边形最多只有三个锐角.因为凸多边形的外角和为\(360\ ...

  4. PJzhang:百度网盘是如何泄露公司机密的?

    猫宁!!! 参考链接:https://mp.weixin.qq.com/s/PLELMu8cVleOLlwRAAYPVg 百度网盘在中国一家独大,百度超级会员具有很多特权,尤其是在下载速度上,是普通会 ...

  5. bzoj2825:[AHOI2012]收集资源

    传送门 看到数据范围这么小,就没想过暴力的办法么 考虑肯定是从近走到远,所以走的点之间一定没有其他的点,所以我们就可以暴力的建图,然后暴力的去dfs就好了 代码: #include<cstdio ...

  6. vijos次小生成树

    xiaomengxian的哥哥是一个游戏迷,他喜欢研究各种游戏.这天,xiaomengxian到他家玩,他便拿出了自己最近正在研究的一个游戏给xiaomengxian看.这个游戏是这样的:一个国家有N ...

  7. 世风日下的哗啦啦族I (简单分块模板)

    题目链接 #include <bits/stdc++.h> using namespace std; typedef long long ll; #define inf 0x7ffffff ...

  8. Java - 怎么通过环境变量来切换jdk版本

    问题与分析 我在本地安装了1.7和1.8两个版本的jdk,此时我的JAVA_HOME环境变量配置的是jdk1.8,在cmd窗口输入java -version发现报错如下: C:\Users\Lewis ...

  9. properties 文件注意事项

    不要使用""双引号包裹内容 db.validationQuery="select 1"比如上面这种是错误的,下面的是正确的写法 db.validationQue ...

  10. [題解](并查集)luogu_P2391 白雪皚皚

    今天被老師留的作業搞死了,全是裸的水題,難題就那麼兩道我還沒寫......,狗屎 1.倒序處理,每個點至多會被更新一次 2.所以要做的就是快速找到下一個不同顏色的點, 3.然而不知道怎麼就 想到用并查 ...