/etc/yum.repos.d /home/nocc/kubesphere/kubesphere-all-offline-v2.1.0/scripts
/etc/yum.repos.d
umount: /kubeinstaller/pip_repo/pip27/iso: target is busy.
(In some cases useful info about processes that use
the device is found by lsof(8) or fuser(1))
mount: /dev/loop0 is write-protected, mounting read-only
mount: /dev/loop2 is write-protected, mounting read-only
Loaded plugins: fastestmirror, langpacks
Cleaning repos: bash
Cleaning up list of fastest mirrors
Loaded plugins: fastestmirror, langpacks
Determining fastest mirrors
bash | 2.9 kB 00:00:00
(⅓): bash/filelists_db | 291 kB 00:00:00
(⅔): bash/primary_db | 782 kB 00:00:00
(3/3): bash/other_db | 168 kB 00:00:00
Metadata Cache Created
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
Package python-2.7.5-86.el7.x86_64 already installed and latest version
Package sshpass-1.06-2.el7.x86_64 already installed and latest version
Package 3:docker-ce-18.09.7-3.el7.x86_64 already installed and latest version
Nothing to do
Init successsful!
DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won’t be maintained after that date. A future version of pip will drop support for Python 2.7. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support
Looking in links: /kubeinstaller/pip_repo/pip27/iso
Collecting pip
Installing collected packages: pip
Found existing installation: pip 19.3.1
Uninstalling pip-19.3.1:
Successfully uninstalled pip-19.3.1
Successfully installed pip-19.3.1
DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won’t be maintained after that date. A future version of pip will drop support for Python 2.7. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support
Looking in links: /kubeinstaller/pip_repo/pip27/iso
Processing /root/.cache/pip/wheels/9a/50/0d/d81fe4ad9da8e1eaf563d26a45321e78b0e9b545c5dbc70203/PyYAML-5.1.2-cp27-cp27mu-linux_x86_64.whl
Installing collected packages: PyYAML
Successfully installed PyYAML-5.1.2
DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won’t be maintained after that date. A future version of pip will drop support for Python 2.7. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support
Looking in links: /kubeinstaller/pip_repo/pip27/iso
Requirement already satisfied: ansible==2.7.12 in /usr/lib/python2.7/site-packages (from -r os/requirements.txt (line 1)) (2.7.12)
Requirement already satisfied: jinja2==2.10.1 in /usr/lib64/python2.7/site-packages (from -r os/requirements.txt (line 2)) (2.10.1)
Processing /kubeinstaller/pip_repo/pip27/iso/netaddr-0.7.19-py2.py3-none-any.whl
Processing /kubeinstaller/pip_repo/pip27/iso/pbr-5.2.0-py2.py3-none-any.whl
Processing /kubeinstaller/pip_repo/pip27/iso/hvac-0.8.2-py2.py3-none-any.whl
Processing /kubeinstaller/pip_repo/pip27/iso/jmespath-0.9.4-py2.py3-none-any.whl
Processing /kubeinstaller/pip_repo/pip27/iso/ruamel.yaml-0.15.96-cp27-cp27mu-manylinux1_x86_64.whl
Requirement already satisfied: PyYAML in /usr/lib64/python2.7/site-packages (from ansible==2.7.12->-r os/requirements.txt (line 1)) (5.1.2)
Requirement already satisfied: paramiko in /usr/lib/python2.7/site-packages (from ansible==2.7.12->-r os/requirements.txt (line 1)) (2.6.0)
Requirement already satisfied: setuptools in /usr/lib/python2.7/site-packages (from ansible==2.7.12->-r os/requirements.txt (line 1)) (0.9.8)
Requirement already satisfied: cryptography in /usr/lib64/python2.7/site-packages (from ansible==2.7.12->-r os/requirements.txt (line 1)) (1.7.2)
Requirement already satisfied: MarkupSafe>=0.23 in /usr/lib64/python2.7/site-packages (from jinja2==2.10.1->-r os/requirements.txt (line 2)) (1.1.1)
Processing /kubeinstaller/pip_repo/pip27/iso/requests-2.22.0-py2.py3-none-any.whl
Processing /kubeinstaller/pip_repo/pip27/iso/ruamel.ordereddict-0.4.14-cp27-cp27mu-manylinux1_x86_64.whl
Requirement already satisfied: pynacl>=1.0.1 in /usr/lib64/python2.7/site-packages (from paramiko->ansible==2.7.12->-r os/requirements.txt (line 1)) (1.3.0)
Requirement already satisfied: bcrypt>=3.1.3 in /usr/lib64/python2.7/site-packages (from paramiko->ansible==2.7.12->-r os/requirements.txt (line 1)) (3.1.7)
Requirement already satisfied: idna>=2.0 in /usr/lib/python2.7/site-packages (from cryptography->ansible==2.7.12->-r os/requirements.txt (line 1)) (2.4)
Requirement already satisfied: pyasn1>=0.1.8 in /usr/lib/python2.7/site-packages (from cryptography->ansible==2.7.12->-r os/requirements.txt (line 1)) (0.1.9)
Requirement already satisfied: six>=1.4.1 in /usr/lib/python2.7/site-packages (from cryptography->ansible==2.7.12->-r os/requirements.txt (line 1)) (1.9.0)
Requirement already satisfied: enum34 in /usr/lib/python2.7/site-packages (from cryptography->ansible==2.7.12->-r os/requirements.txt (line 1)) (1.0.4)
Requirement already satisfied: ipaddress in /usr/lib/python2.7/site-packages (from cryptography->ansible==2.7.12->-r os/requirements.txt (line 1)) (1.0.16)
Requirement already satisfied: cffi>=1.4.1 in /usr/lib64/python2.7/site-packages (from cryptography->ansible==2.7.12->-r os/requirements.txt (line 1)) (1.6.0)
Processing /kubeinstaller/pip_repo/pip27/iso/chardet-3.0.4-py2.py3-none-any.whl
Processing /kubeinstaller/pip_repo/pip27/iso/urllib3-1.25.7-py2.py3-none-any.whl
Processing /kubeinstaller/pip_repo/pip27/iso/certifi-2019.9.11-py2.py3-none-any.whl
Requirement already satisfied: pycparser in /usr/lib/python2.7/site-packages (from cffi>=1.4.1->cryptography->ansible==2.7.12->-r os/requirements.txt (line 1)) (2.14)
ERROR: boto3 1.4.6 requires botocore<1.7.0,>=1.6.0, which is not installed.
ERROR: msrest 0.5.4 requires typing, which is not installed.
ERROR: ipaserver 4.6.5 requires dbus-python, which is not installed.
ERROR: ipaserver 4.6.5 requires dogtag-pki, which is not installed.
ERROR: ipaserver 4.6.5 requires jwcrpyto>=0.4.2, which is not installed.
ERROR: ipaserver 4.6.5 has requirement dnspython>=1.15, but you’ll have dnspython 1.12.0 which is incompatible.
ERROR: ipaserver 4.6.5 has requirement python-ldap>=3.0.0b1, but you’ll have python-ldap 2.4.15 which is incompatible.
ERROR: requests 2.22.0 has requirement idna<2.9,>=2.5, but you’ll have idna 2.4 which is incompatible.
ERROR: azure-keyvault 1.0.0 has requirement cryptography>=2.1.4, but you’ll have cryptography 1.7.2 which is incompatible.
ERROR: ipapython 4.6.5 has requirement dnspython>=1.15, but you’ll have dnspython 1.12.0 which is incompatible.
ERROR: ipapython 4.6.5 has requirement python-ldap>=3.0.0b1, but you’ll have python-ldap 2.4.15 which is incompatible.
Installing collected packages: netaddr, pbr, chardet, urllib3, certifi, requests, hvac, jmespath, ruamel.ordereddict, ruamel.yaml
Found existing installation: netaddr 0.7.5
ERROR: Cannot uninstall ‘netaddr’. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall.

服务器是离线环境怎么办?

我看os/centos7.sh中#install_pip_packages被注释了,为什么?

手动执行了
sudo pip install –ignore-installed netaddr –no-index –find-links=/kubeinstaller/pip_repo/pip27/iso
sudo pip install –ignore-installed requests –no-index –find-links=/kubeinstaller/pip_repo/pip27/iso
又从网上下载了python_dateutil-2.8.0-py2.py3-none-any.whl和botocore-1.6.8-py2.py3-none-any.whl
sudo pip install python_dateutil-2.8.0-py2.py3-none-any.whl
sudo pip install botocore-1.6.8-py2.py3-none-any.whl

然后就提示:
Please ensure that your environment has met the above requirements (yes/no) yes


  1. Initiating Environment
    *********************************************
    ERROR! Unexpected Exception, this is probably a bug: name ‘platform_system’ is not defined
    the full traceback was:

Traceback (most recent call last):
File “/usr/bin/ansible-playbook”, line 97, in <module>
mycli = getattr(import(“ansible.cli.%s” % sub, fromlist=[myclass]), myclass)
File “/usr/lib/python2.7/site-packages/ansible/cli/init.py”, line 38, in <module>
from ansible.inventory.manager import InventoryManager
File “/usr/lib/python2.7/site-packages/ansible/inventory/manager.py”, line 38, in <module>
from ansible.plugins.loader import inventory_loader
File “/usr/lib/python2.7/site-packages/ansible/plugins/loader.py”, line 22, in <module>
from ansible.parsing.utils.yaml import from_yaml
File “/usr/lib/python2.7/site-packages/ansible/parsing/utils/yaml.py”, line 17, in <module>
from ansible.parsing.yaml.loader import AnsibleLoader
File “/usr/lib/python2.7/site-packages/ansible/parsing/yaml/loader.py”, line 30, in <module>
from ansible.parsing.yaml.constructor import AnsibleConstructor
File “/usr/lib/python2.7/site-packages/ansible/parsing/yaml/constructor.py”, line 29, in <module>
from ansible.parsing.vault import VaultLib
File “/usr/lib/python2.7/site-packages/ansible/parsing/vault/init.py”, line 42, in <module>
from cryptography.hazmat.backends import default_backend
File “/usr/lib64/python2.7/site-packages/cryptography/hazmat/backends/init.py”, line 7, in <module>
import pkg_resources
File “/usr/lib/python2.7/site-packages/pkg_resources.py”, line 3007, in <module>
working_set.require(requires)
File “/usr/lib/python2.7/site-packages/pkg_resources.py”, line 728, in require
needed = self.resolve(parse_requirements(requirements))
File “/usr/lib/python2.7/site-packages/pkg_resources.py”, line 631, in resolve
requirements.extend(dist.requires(req.extras)[::-1])
File “/usr/lib/python2.7/site-packages/pkg_resources.py”, line 2489, in requires
dm = self._dep_map
File “/usr/lib/python2.7/site-packages/pkg_resources.py”, line 2700, in dep_map
self.__dep_map = self.
compute_dependencies()
File “/usr/lib/python2.7/site-packages/pkg_resources.py”, line 2733, in compute_dependencies
common = frozenset(reqs_for_extra(None))
File “/usr/lib/python2.7/site-packages/pkg_resources.py”, line 2730, in reqs_for_extra
if req.marker_fn(override={‘extra’:extra}):
File “/usr/lib/python2.7/site-packages/
markerlib/markers.py”, line 113, in marker_fn
return eval(compiled_marker, environment)
File “<environment marker>”, line 1, in <module>
NameError: name ‘platform_system’ is not defined
failed!


please refer to https://kubesphere.io/docs/v2.1/zh-CN/faq/faq-install/


和https://kubesphere.com.cn/forum/d/306-all-in-one-version-2-1-0类似,求助

先把 requests卸载掉 再装下试试

    Cauchy requests重新安装是用离线包中的wheel还是直接安装最新版?