quickstart-lite-steps-hi3861-faqs.md 8.5 KB
Newer Older
D
duangavin123 已提交
1
# FAQs<a name="EN-US_TOPIC_0000001128311054"></a>
Y
yangni 已提交
2

N
NEEN 已提交
3 4 5 6 7 8 9 10
-   [What should I do when the message configure: error: no acceptable C compiler found in $PATH is displayed during Python 3 installation?](#section1221016541119)
-   [What should I do when the message -bash: make: command not found is displayed during Python 3 installation?](#section1913477181213)
-   [What should I do when the message zlib not available is displayed during Python 3 installation?](#section108211415131210)
-   [What should I do when the message No module named '\_ctypes' is displayed during Python 3 installation?](#section2062268124)
-   [What should I do when the message No module named 'Crypto' is displayed during compilation and building?](#section982315398121)
-   [What should I do when the message No module named 'ecdsa' is displayed during compilation and building?](#section102035451216)
-   [What should I do when the message Could not find a version that satisfies the requirement six\>=1.9.0 is displayed during compilation and building?](#section4498158162320)
-   [What should I do when the message cannot find -lgcc is displayed during compilation and building?](#section11181036112615)
Y
yangni 已提交
11
-   [What should I do when the message indicating Python cannot be found is displayed during compilation and building?](#section1571810194619)
N
NEEN 已提交
12
-   [What should I do when an error with lsb\_release occurs during kconfiglib installation?](#section691681635814)
Y
yangni 已提交
13 14 15 16 17

## What should I do when the message  **configure: error: no acceptable C compiler found in $PATH**  is displayed during Python 3 installation?<a name="section1221016541119"></a>

-   **Symptom**

N
NEEN 已提交
18
    The following error occurs during Python 3 installation:
Y
yangni 已提交
19 20 21 22 23 24 25

    ```
    configure: error: no acceptable C compiler found in $PATH. See 'config.log' for more details
    ```

-   **Possible Causes**

N
NEEN 已提交
26
    **GCC**  is not installed.
Y
yangni 已提交
27 28 29

-   **Solutions**

N
NEEN 已提交
30
    1. Run the  **apt-get install gcc**  command to install  **GCC**  online.
Y
yangni 已提交
31 32 33 34 35 36 37 38

    2. After the installation, reinstall Python 3.


## What should I do when the message  **-bash: make: command not found**  is displayed during Python 3 installation?<a name="section1913477181213"></a>

-   **Symptom**

N
NEEN 已提交
39
    The following error occurs during Python 3 installation:
Y
yangni 已提交
40 41 42 43 44 45 46

    ```
    -bash: make: command not found
    ```

-   **Possible Causes**

N
NEEN 已提交
47
    **Make**  is not installed.
Y
yangni 已提交
48 49 50

-   **Solutions**

N
NEEN 已提交
51
    1. Run the  **apt-get install make**  command to install  **Make**  online.
Y
yangni 已提交
52 53 54 55 56 57 58 59

    2. After the installation, reinstall Python 3.


## What should I do when the message  **zlib not available**  is displayed during Python 3 installation?<a name="section108211415131210"></a>

-   **Symptom**

N
NEEN 已提交
60
    The following error occurs during Python 3 installation:
Y
yangni 已提交
61 62 63 64 65 66 67 68 69 70 71 72 73 74 75

    ```
    zipimport.ZipImportError: can't decompress data; zlib not avaliable
    ```

-   **Possible Causes**

    **zlib**  is not installed.

-   **Solutions**

    Solution 1: Run the  **apt-get install zlib**  command to install  **zlib**  online.

    Solution 2: If the software source does not contain  **zlib**, download the source code from  [http://www.zlib.net/](http://www.zlib.net/).

D
duangavin123 已提交
76
    ![](figure/download-zlib.png)
Y
yangni 已提交
77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93

    Then run the following commands to install  **zlib**  offline:

    ```
    # tar xvf zlib-1.2.11.tar.gz
    # cd zlib-1.2.11
    # ./configure
    # make && make install
    ```

    After the installation, reinstall Python 3.


## What should I do when the message  **No module named '\_ctypes'**  is displayed during Python 3 installation?<a name="section2062268124"></a>

-   **Symptom**

N
NEEN 已提交
94
    The following error occurs during Python 3 installation:
Y
yangni 已提交
95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136

    ```
    ModuleNotFoundError: No module named '_ctypes'
    ```


-   **Possible Causes**

    **libffi**  and  **libffi-devel**  are not installed.


-   **Solutions**

    1. Run the  **apt-get install libffi\* -y**  command to install  **libffi**  and  **libffi-devel**  online.

    2. After the installation, reinstall Python 3.


## What should I do when the message  **No module named 'Crypto'**  is displayed during compilation and building?<a name="section982315398121"></a>

-   **Symptom**

    The following error occurs during compilation and building:

    ```
    ModuleNotFoundError: No module named 'Crypto'
    ```


-   **Possible Causes**

    **Crypto**  is not installed.


-   **Solutions**

    Solution 1: Run the  **pip3 install Crypto**  command to install  **Crypto**  online.

    Solution 2: Install  **Crypto**  offline.

    -   Download the source code from  [https://pypi.org/project/pycrypto/\#files](https://pypi.org/project/pycrypto/#files).

D
duangavin123 已提交
137
    ![](figure/download-the-source-code.png)
Y
yangni 已提交
138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166

    -   Save the source code package to the Linux server, decompress the package, and run the  **python3 setup.py install**  command to install  **Crypto**.
    -   Rebuild an environment.


## What should I do when the message  **No module named 'ecdsa'**  is displayed during compilation and building?<a name="section102035451216"></a>

-   **Symptom**

    The following error occurs during compilation and building:

    ```
    ModuleNotFoundError: No module named 'ecdsa'
    ```


-   **Possible Causes**

    **ecdsa**  is not installed.


-   **Solutions**

    Solution 1: Run the  **pip3 install ecdsa**  command to install  **ecdsa**  online.

    Solution 2: Install  **ecdsa**  offline.

    -   Download the installation package from  [https://pypi.org/project/ecdsa/\#files](https://pypi.org/project/ecdsa/#files).

D
duangavin123 已提交
167
    ![](figure/download-ecdsa.png)
Y
yangni 已提交
168 169 170 171 172 173 174 175 176 177 178 179

    -   Save the installation package to the Linux server and run the  **pip3 install ecdsa-0.15-py2.py3-none-any.whl**  command to install  **ecdsa**.
    -   Rebuild an environment.


## What should I do when the message  **Could not find a version that satisfies the requirement six\>=1.9.0**  is displayed during compilation and building?<a name="section4498158162320"></a>

-   **Symptom**

    The following error occurs during compilation and building:

    ```
N
NEEN 已提交
180
    Could not find a version that satisfies the requirement six>=1.9.0
Y
yangni 已提交
181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196
    ```


-   **Possible Causes**

    **six**  is not installed.


-   **Solutions**

    Solution 1: Run the  **pip3 install six**  command to install  **six**  online.

    Solution 2: Install  **six**  offline.

    -   Download the installation package from  [https://pypi.org/project/six/\#files](https://pypi.org/project/six/#files).

D
duangavin123 已提交
197
    ![](figure/download-six.png)
Y
yangni 已提交
198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245

    -   Save the source code to the Linux server and run the  **pip3 install six-1.14.0-py2.py3-none-any.whl**  command to install  **six**.
    -   Rebuild an environment.


## What should I do when the message  **cannot find -lgcc**  is displayed during compilation and building?<a name="section11181036112615"></a>

-   **Symptom**

    The following error occurs during compilation and building:

    ```
    riscv32-unknown-elf-ld: cannot find -lgcc
    ```


-   **Possible Causes**

    The PATH is incorrectly written by  **gcc\_riscv32**. There is an extra slash \(/\).

    ```
    ~/gcc_riscv32/bin/:/data/toolchain/
    ```


-   **Solutions**

    Modify the PATH by deleting the slash \(/\).

    ```
    ~/gcc_riscv32/bin:/data/toolchain/
    ```


## What should I do when the message indicating Python cannot be found is displayed during compilation and building?<a name="section1571810194619"></a>

-   **Symptom**

    The following error occurs during compilation and building:

    ```
    -bash: /usr/bin/python: No such file or directory
    ```


-   **Possible Cause 1:**  Python is not installed.
-   **Solutions**

D
duangavin123 已提交
246
    Install Python as instructed in  [Installing and Configuring Python](quickstart-lite-env-setup-linux.md#section1238412211211).
Y
yangni 已提交
247 248 249

-   **Possible Cause 2:**  The soft link that points to the Python does not exist in the  **usr/bin**  directory.

D
duangavin123 已提交
250
    ![](figure/reason-2.png)
Y
yangni 已提交
251 252 253 254 255 256 257 258 259 260 261 262 263 264

-   **Solutions**

    Run the following commands to add a soft link:

    ```
    # cd /usr/bin/
    # which python3
    # ln -s /usr/local/bin/python3 python
    # python --version
    ```

    Example:

D
duangavin123 已提交
265
    ![](figure/solution.png)
Y
yangni 已提交
266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286


## What should I do when an error with  **lsb\_release**  occurs during  **kconfiglib**  installation?<a name="section691681635814"></a>

-   **Symptom**

    The following error occurs during  **kconfiglib**  installation:

    ```
    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.

-   **Solutions**

    Run the  **find / -name lsb\_release**  command, for example,  **sudo rm -rf /usr/bin/lsb\_release**  to locate and delete  **lsb\_release**.