未验证 提交 864706f1 编写于 作者: O openharmony_ci 提交者: Gitee

!11058 [翻译完成】#I5S4AJ

Merge pull request !11058 from Annie_wang/PR9710A
......@@ -3,61 +3,62 @@
## Mini and Small Systems
### hb Installation
### What should I do if garbled characters and segmentation faults occur during hb installation?
#### Garbled Characters and Segmentation Faults
- **Symptom**
Garbled characters and segmentation faults occur during the execution of the **python3 -m pip install --user ohos-build** command.
After the **python3 -m pip install --user ohos-build** command is executed, garbled characters and segmentation faults occur.
- **Possible Causes**
pip is of an early version.
The pip version does not meet requirements.
- **Solution**
Upgrade pip.
Run the following command to upgrade pip:
```
python3 -m pip install -U pip
```
### What should I do if the message "cannot import 'sysconfig' from 'distutils'" is displayed during hb installation?
#### "cannot import 'sysconfig' from 'distutils'"
- **Symptom**
The message "cannot import 'sysconfig' from 'distutils'" is displayed during the execution of the **python3 -m pip install --user ohos-build** command.
During the execution of **python3 -m pip install --user ohos-build**, the following information is displayed:<br>cannot import 'sysconfig' from 'distutils'
- **Possible Causes**
The **distutils** module is unavailable.
The **distutils** module is unavailable.
- **Solution**
Install **distutils**.
Run the following command to install **distutils**:
```
sudo apt-get install python3.8-distutils
```
### What should I do if the message "module 'platform' has no attribute 'linux_distribution'" is displayed during hb installation?
#### "module 'platform' has no attribute 'linux_distribution'"
- **Symptom**
The message "module 'platform' has no attribute 'linux_distribution'" is displayed during the execution of the **python3 -m pip install --user ohos-build** command.
During the execution of **python3 -m pip install --user ohos-build**, the following information is displayed:<br>module 'platform' has no attribute 'linux\_distribution'
- **Possible Causes**
There is a compatibility issue of python3-pip.
There is a compatibility issue of python3-pip.
- **Solution**
Reinstall pip.
Reinstall pip.
```
sudo apt remove python3-pip
......@@ -66,19 +67,21 @@ Reinstall pip.
```
### What should I do if the message "Could not find a version that satisfies the requirement ohos-build" is displayed during hb installation?
#### "Could not find a version that satisfies the requirement ohos-build"
- **Symptom**
The message "Could not find a version that satisfies the requirement ohos-build" is displayed during the execution of the **python3 -m pip install --user ohos-build** command.
During the execution of **python3 -m pip install --user ohos-build**, the following information is displayed:<br>Could not find a version that satisfies the requirement ohos-build
- **Possible Causes**
The installation fails due to poor network connectivity.
The installation fails due to poor network connectivity.
- **Solution**
1. Ensure that your computer has a good network connection. If the network connection is unstable, rectify the network fault and reinstall hb.
1. Check that your computer has a good network connection. If the network connection is unstable, rectify the network fault and reinstall hb.
2. If the network is functional, run the following commands to install hb by specifying a temporary PyPI source:
```
......@@ -86,148 +89,152 @@ The installation fails due to poor network connectivity.
```
### What should I do if the message "configure: error: no acceptable C compiler found in $PATH" is displayed during Python 3 installation?
- **Symptom**
### Python 3 Installation
The following error occurs during Python 3 installation:
#### "configure: error: no acceptable C compiler found in $PATH"
- **Symptom**
The following informaton is displayed during the Python 3 installation process:
```
configure: error: no acceptable C compiler found in $PATH. See 'config.log' for more details
```
```
- **Possible Causes**
**gcc** is not installed.
GCC is not installed.
- **Solution**
1. Run the **apt-get install gcc** command to install **gcc** online.
2. After the installation, reinstall Python 3.
1. Run the **apt-get install gcc** command to install GCC online.
2. Install Python 3.
### What should I do if the message "-bash: make: command not found is displayed" during Python 3 installation?
- **Symptom**
The following error occurs during Python 3 installation:
#### "-bash: make: command not found"
- **Symptom**
The following information is displayed during the Python 3 installation process:
```
-bash: make: command not found
```
```
- **Possible Causes**
**Make** is not installed.
make is not installed.
- **Solution**
1. Run the **apt-get install make** command to install Make online.
2. After the installation, reinstall Python 3.
1. Run the **apt-get install make** command to install make online.
2. Install Python 3.
### What should I do if the message **zlib not available** is displayed during Python 3 installation?
- **Symptom**
The following error occurs during Python 3 installation:
#### "zlib not available"
- **Symptom**
The following information is displayed during the Python 3 installation process:
```
zipimport.ZipImportError: can't decompress data; zlib not available
```
```
- **Possible Causes**
**zlib** is not installed.
**zlib** is not installed.
- **Solution**
Solution 1: Run the **apt-get install zlib** command to install **zlib** online.
1. Install zlib online or offline.
Online installation:
Solution 2: If the software source does not contain **zlib**, download the source code from <xref href="http://www.zlib.net/" scope="external" class="- topic/xref " id="xref17252104445818">http://www.zlib.net/</xref>.
Run the **apt-get install zlib** command to install zlib online.
![en-us_image_0000001198001086](figures/en-us_image_0000001198001086.png)
Offline installation:
Then run the following commands to install **zlib** offline:
1. Download zlib from http://www.zlib.net/.
![](figures/download-zlib.png)
2. Run the following command to install zlib:
```
# tar xvf zlib-1.2.11.tar.gz
# cd zlib-1.2.11
# ./configure
# make && make install
```
```
After the installation, reinstall Python 3.
2. Install Python 3.
### What should I do if the message "No module named 'Crypto'" is displayed during the build process?
- **Symptom**
#### "No module named '_ctypes'"
The following error occurs during compilation and building:
- **Symptom**
The following information is displayed during the Python 3 installation process:
```
ModuleNotFoundError: No module named 'Crypto'
```
- **Possible Causes**
**Crypto** is not installed.
ModuleNotFoundError: No module named '_ctypes'
```
- **Solution**
Solution 1: Run the **pip3 install Crypto** command to install **Crypto** online.
- **Possible Causes**
Method 2: Offline installation
libffi and libffi-devel are not installed.
Download the source code from [PyPI](https://pypi.org/project/pycrypto/#files).
![en-us_image_0000001251196005](figures/en-us_image_0000001251196005.png)
- **Solution**
Save the source package to the Linux server, decompress the package, and run the **python3 setup.py install** command to install Crypto.
1. Run the **apt-get install libffi\* -y** command to install libffi and libffi-devel online.
After the preceding installation is complete, rebuild an environment.
2. Install Python 3.
### What should I do when an error with **lsb_release** occurs during **kconfiglib** installation?
### lsb_release Error During kconfiglib Installation
- **Symptom**
The following error occurs during **kconfiglib** installation:
The following information is displayed during the **kconfiglib** installation process:
```
subprocess.CalledProcessError: Command '('lsb_release', '-a')' returned non-zero exit status 1.
```
```
- **Possible Causes**
The Python version matched with the **lsb_release** module is different from the current Python version.
The Python version in use does not match the Python version on which the lsb_release module depends.
- **Solution**
Run the **find / -name lsb_release** command, for example, **sudo rm -rf /usr/bin/lsb_release** to locate and delete **lsb_release**.
Run **find / -name lsb_release** to locate lsb_release, and delete it, for example, run **sudo rm -rf /usr/bin/lsb_release**.
### What should I do if the message "ImportError: No module named apt_pkg" is displayed during the execution of an unidentifiable command?
### "ImportError: No module named apt_pkg"
- **Symptom**
The message "ImportError: No module named apt_pkg" is displayed when an unidentifiable command is executed on the Linux server.
When an unidentifiable command is executed on the Linux server, the following information is displayed:<br>ImportError: No module named apt_pkg
- **Possible Causes**
There is a compatibility issue of python3-apt.
There is a compatibility issue of python3-apt.
- **Solution**
Reinstall python3-apt.
Reinstall python3-apt.
```
sudo apt-get remove python3-apt
......
......@@ -11,27 +11,27 @@ FAQs are used to help developers solve problems frequently encountered during de
- hb installation
- [What should I do if garbled characters and segmentation faults occur during hb installation?](../faqs/faqs-environment-setup.md)
- [Garbled Characters and Segmentation Faults](../faqs/faqs-environment-setup.md)
- [What should I do if the message "cannot import 'sysconfig' from 'distutils'" is displayed during hb installation?](../faqs/faqs-environment-setup.md)
- ["cannot import 'sysconfig' from 'distutils'"](../faqs/faqs-environment-setup.md)
- [What should I do if the message "module 'platform' has no attribute 'linux_distribution'" is displayed during hb installation?](../faqs/faqs-environment-setup.md)
- ["module 'platform' has no attribute 'linux_distribution'"](../faqs/faqs-environment-setup.md)
- [What should I do if the message "Could not find a version that satisfies the requirement ohos-build" is displayed during hb installation?](../faqs/faqs-environment-setup.md)
- ["Could not find a version that satisfies the requirement ohos-build"](../faqs/faqs-environment-setup.md)
- Python3 Installation
- [What should I do if the message "configure: error: no acceptable C compiler found in $PATH" is displayed during Python 3 installation?](../faqs/faqs-environment-setup.md)
- ["configure: error: no acceptable C compiler found in $PATH"](../faqs/faqs-environment-setup.md)
- [What should I do if the message "-bash: make: command not found" is displayed during Python 3 installation?](../faqs/faqs-environment-setup.md)
- ["-bash: make: command not found"](../faqs/faqs-environment-setup.md)
- [What should I do if the message "zlib not available" is displayed during Python 3 installation?](../faqs/faqs-environment-setup.md)
- ["zlib not available"](../faqs/faqs-environment-setup.md)
- [What should I do if the message "No module named 'Crypto'" is displayed during the build process?](../faqs/faqs-environment-setup.md)
- ["No module named '_ctypes'"](../faqs/faqs-environment-setup.md)
- [What should I do when an error with lsb_release occurs during kconfiglib installation?](../faqs/faqs-environment-setup.md)
- [lsb_release Error During kconfiglib Installation](../faqs/faqs-environment-setup.md)
- [What should I do if the message "ImportError: No module named apt_pkg" is displayed during the execution of an unidentifiable command?](../faqs/faqs-environment-setup.md)
- ["ImportError: No module named apt_pkg"](../faqs/faqs-environment-setup.md)
## Compilation and Building
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册