# 疑難排解

## Docker

- **docker: Cannot connect to the Docker daemon atunix:///var/run/docker.sock. Is the docker daemon running?**

    運行以下命令以啟動 Docker：

sudo systemctl start docker
        Copy to clipboard
- **Error response from daemon: Get “https://registry-1.docker.io/v2/”: http: server gave HTTP response to HTTPS client**

    添加內部 Docker 註冊表鏡像（Qualcomm 網路的內部設置）。

備註

不要在 JSON 配置檔案中包含 # 註釋。使用 tab 而不是空格以及其他不可見的空白字元可能會破壞 JSON 配置檔案的功能，並可能導致 `docker.service` 無法啟動。

sudo vim /etc/docker/daemon.json
        # Add an entry similar to the following in /etc/docker/daemon.json:
        {
           "registry-mirrors": ["https://docker-registry.qualcomm.com"]
        }
        Copy to clipboard

備註

作為替代方案，您可以在 `/etc/docker/daemon.json` 中添加以下條目：

`"registry-mirrors": ["https://ccr.ccs.tencentyun.com"]`

    重新啟動 Docker 服務以採用新設置。

sudo systemctl restart docker
        Copy to clipboard
- **Failed to download from https://download.docker.com**

備註

如果您無法訪問或下載 [https://download.docker.com](https://download.docker.com)，請運行以下命令以安裝 docker：

sudo apt update
        sudo apt install apt-transport-https ca-certificates curl gnupg lsb-release
        curl -fsSL http://mirrors.aliyun.com/docker-ce/linux/ubuntu/gpg | sudo apt-key add –
        sudo add-apt-repository "deb [arch=amd64] http://mirrors.aliyun.com/docker-ce/linux/ubuntu $(lsb_release -cs) stable"
        Copy to clipboard
- **Docker failure due to Virtualization not enabled**

    從 BIOS 啟用虛擬化以解決此錯誤。按照系統提供商的具體指示啟用虛擬化。例如，以下步驟可以啟用系統提供商提供的虛擬化：

    1. 當系統啟動時，進入 BIOS。出現 BIOS 視窗。
    2. 切換到 進階 標籤。
    3. In the CPU Configuration section, set Virtualization Technology to enabled.
    4. 保存並退出。
    5. 重新啟動系統。
- **Permission denied while trying to connect to the Docker daemonsocket at unix:///var/run/docker.sock**

    當 qsc-cli 已經安裝在機器上且您不屬於 Docker 組時會發生此情況：

sudo groupadd docker
        sudo usermod -aG docker $USER
        newgrp docker
        Copy to clipboard

    要確認您是否屬於 Docker 群組，請運行以下命令：

sudo grep /etc/group -e "docker"
        # This command shows a list of users who are part of the Docker group; must include your user ID
        Copy to clipboard

    登出並重新登錄以使訪問生效。

# You can run the following command to check if you are part of the Docker group
        id -a
        # This command returns an output string which should include 'docker'
        Copy to clipboard

## 同步

- **repo init or sync failure with except ManifestInvalidRevisionError,e:**

    安裝 Repo 軟體包後可能會看到此問題：

    - 如果您的 `/etc/gitconfig` 或 `~/.gitconfig` 中有重定向到內部鏡像。
    - 如果您的內部鏡像在鏡像時對分支有前綴。例如，如果 `/etc/gitconfig` 重定向並且內部鏡像有來自上游 git 的穩定分支鏡像為 `aosp/stable`，則在執行 `repo init` 時會出現以下錯誤：

[url "ssh://<internal mirror>:<port>/tools/repo"]
        insteadOf = https://android.googlesource.com/tools/repo
        insteadOf = https://gerrit.googlesource.com/git-repo
        Copy to clipboard

File "/local/mnt/workspace/<userid>/test_repo/.repo/repo/main.py", line 126
           except ManifestInvalidRevisionError, e:
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        SyntaxError: multiple exception types must be parenthesized
        Copy to clipboard

    解決此錯誤的步驟如下：

# Remove the older .repo folder. This will be in the directory where you ran 'repo init' command earlier
        rm -rf .repo
        
        # Export and run the repo commands to fix the repo issues. The REPO_REV must point to the mirrored
        # branch from upstream 'stable' branch of https://gerrit.googlesource.com/git-repo
        export REPO_REV='aosp/stable'
        Copy to clipboard
- **Install repo “Server certificate verification failed”**

    如果您看到證書錯誤，例如 『伺服器證書驗證失敗。CAfile: none CRLfile: none』，請配置 git 以禁用 SSL 證書驗證，並與您的 IT 管理員討論以獲取進一步指導。您可以使用以下任一命令來禁用 SSL：

export GIT_SSL_NO_VERIFY=1
        git config --global http.sslverify false
        Copy to clipboard

    如果您的地區阻止訪問 `android.googlesource`，請嘗試以下配置從 CodeLinaro 鏡像獲取 Repo：

git config --global url.https://git.codelinaro.org/clo/la/tools/repo.insteadOf https://android.googlesource.com/tools/repo
        Copy to clipboard
- **error.GitError: git config (‘–replace-all’, ‘color.ui’, ‘auto’):error: could not write config file /home/$USER/.gitconfig: Device orresource busy**

    當您的 gitconfig 未設置 UI 顏色配置時會發生此錯誤。此配置在 Git 1.8.4 及更高版本中預設設置。運行以下命令以在您的帳戶中啟用顏色顯示：

git config --global color.ui auto
        Copy to clipboard
- **[Error]: Failed preparing build for compilation. Error: Errorsetting docker credentials. Error: “Error saving credentials: errorclosing temp file: close/usr2/&lt;userid&gt;/.docker/config.json3322274803: disk quotaexceeded\n”**

    QSC CLI 只使用主目錄中的幾千字節 (kB)。從您的主目錄中清除幾 MB。
- **[Error]: The “path” argument must be of type string. Receivedundefined**

    **錯誤摘錄**

qsc-cli download --workspace-path '/local/mnt/workspace/<userid>/K2L/QSC_CLI_BUILD/build' --product 'QCM6490.LE.1.0' --release 'r00270.1' --distribution 'Qualcomm_Linux.SPF.1.0|TEST|DEVICE|PUBLIC'
        [Info]: Starting qsc-cli version 0.0.0.7
        (node:2924765) ExperimentalWarning: The Fetch API is an experimental feature. This feature could change at any time
        (Use `qsc-cli --trace-warnings ...` to show where the warning was created)
        [Info]: Checking if Workspace already exists
        [Info]: Saved updated Workspace info
        [Info]: Workspace Setup Completed
        [Error]: The "path" argument must be of type string. Received undefined
        Copy to clipboard

    **解決方案**

    如果 QSC CLI 與 Qlauncher 不兼容，可能會發生此錯誤。Qlauncher 將被棄用並由 QSC 的新應用程式取代。如果您的工作區中有 Qlauncher，您可以運行以下命令：

# Find your workspace within the Qlauncher UI
        # Take a backup of the following metadata file if you want to preserve the older workspace created with Qlauncher.
        # These will work only with Qlauncher app. You can reinstall the app at a later time again to access. If you don't
        # need the workspaces, you can delete this file using:
        mv /var/lib/qcom/data/qualcomm_launcher/workspaces2.json /var/lib/qcom/data/qualcomm_launcher/workspaces2.json.bak
        # Uninstall Qlauncher with the following command:
        qpm-cli --uninstall qualcomm_launcher
        Copy to clipboard
- **docker: Error response from daemon: error while creating mountsource path ‘/usr2/&lt;userid&gt;/.netrc’: mkdir /usr2/&lt;userid&gt;/.netrc:permission denied**

    **錯誤摘錄**

Updating files: 100% (64/64), done.
        2024-02-29T07:58:00: Sync Command Completed
        2024-02-29T07:58:01: Finished setup.
        [Info]: Setting Docker Credential
        2024-02-29T07:58:03: Authorization successful
        2024-02-29T07:58:03: Sync Command Starting
        2024-02-29T07:58:03: Running Sync Command for SyncOpenSourceCode - DownloadOpenSource
        docker: Error response from daemon: error while creating mount source path '/usr2/ramevelp/.netrc': mkdir /usr2/ramevelp/.netrc: permission denied.
        2024-02-29T07:58:04: Sync Command Failed
        [Error]: Failed SP Download with error: 2024-02-29T07:58:04: Sp Download failed. ExitCode: 126 Signal: 0  with errorcode 4
        [Error]: 2024-02-29T07:58:04: Sp Download failed. ExitCode: 126 Signal: 0
        Copy to clipboard

    **解決方案**

    這可能是由於 IT 設置您的主目錄的方式。與您的 IT 管理員合作以進行主目錄的任何進一步更改。
- **fatal: couldn’t find remote ref refs/heads/qcom-linuxSTXscarthgap**

    如果在從 PDF 複製命令時看到任何垃圾字符，請刪除或替換垃圾字符為適當的符號並重新運行命令。您也可以以 HTML 模式打開指南並使用複製命令選項。

    **範例**

# Replace the following command
        repo init -u https://github.com/quic-yocto/qcom-manifest -b qcom-linuxSTXscarthgap -m qcom-6.6.65-QLI.1.4-Ver.1.1.xml
        # with
        repo init -u https://github.com/quic-yocto/qcom-manifest -b qcom-linux-scarthgap -m qcom-6.6.65-QLI.1.4-Ver.1.1.xml
        Copy to clipboard
- **pull access denied for 032693710300.dkr.ecr.us-west-2.amazonaws.com/stormchaser/ql-tool**

    運行 `qsc-cli` 下載命令時可能會發生此錯誤。

    **錯誤摘錄**

Unable to find image '032693710300.dkr.ecr.us-west-2.amazonaws.com/stormchaser/ql-tool:20.04.20231220102843864.9' locally
        docker: Error response from daemon: pull access denied for 032693710300.dkr.ecr.us-west-2.amazonaws.com/stormchaser/ql-tool, repository doesn't exist or may require 'docker login': denied: Your authorization token has expired. Reauthenticate and try again.
        Copy to clipboard

    **解決方案**

rm -rf ~/.docker/config.json
        Copy to clipboard

    重新運行 `qsc-cli` 命令。

## 構建

- **ERROR: linux-kernel-qcom-6.6-r0 do\_menuconfig: No valid terminalfound, unable to open devshell**

    運行 `bitbake linux-kernel-qcom -c menuconfig` 命令時可能會觸發此錯誤。

    **錯誤摘錄**

ERROR: linux-kernel-qcom-6.6-r0 do_menuconfig: No valid terminal found, unable to open devshell.
        Tried the following commands:
              tmux split-window -c "{cwd}" "do_terminal"
              tmux new-window -c "{cwd}" -n "linux-kernel-qcom Configuration" "do_terminal"
              xfce4-terminal -T "linux-kernel-qcom Configuration" -e "do_terminal"
              terminology -T="linux-kernel-qcom Configuration" -e do_terminal
        Copy to clipboard

    **解決方案**

sudo apt install screen
        sudo apt install tmux
        Copy to clipboard
- **NOTE: No reply from server in 30s**

    如果在重新執行 `qsc-cli compile` 或 `bitbake` 命令時看到此錯誤，您可以嘗試從部分構建的工作區中刪除 `bitbake.lock`、`bitbake.sock` 和 hashserve.lock，然後重試構建。例如，如果您使用 `qsc-cli` 進行構建，這些檔案位於 `<absoute_workspace_path>/DEV/LE.QCLINUX.1.0.r1/build-qcom-wayland` 下。

- **do\_fetch: BitBake Fetcher Error: FetchError(‘Unable to fetch URLfrom any source’)**

    這些是間歇性的獲取失敗。檢查您的網路/主機是否有問題，否則檢查伺服器是否造成此問題。如果在獲取 git 儲存庫時出現錯誤，您可以增加 `.gitconfig` 檔案中的 `postBuffer` 和 `maxRequestBuffer` 設置。如果您使用 `qsc-cli`，這些配置已由 `qsc-cli` 工具處理：

git config --global http.postBuffer 1048576000
        git config --global http.maxRequestBuffer 1048576000
        Copy to clipboard

    如果這些配置不起作用，您可以重試編譯以首次通過這些間歇性錯誤。

    一些大型 git 專案可能會顯示此錯誤。對於這些專案，一個可行的選項是手動克隆，如下所示：

cd <workspace_path>/downloads/git2/
        git clone --bare --mirror https://<url>/<project-name>.git <workspace_path>/downloads/git2/<local-name>.git
        touch <workspace_path>/downloads/git2/<local-name>.git.done
        Copy to clipboard

    例如，當 `do_fetch` 對 `qualcomm_linux-spf-1-0-le-qclinux-1-0-r1_api-linux_history_prebuilts.git` 失敗時，運行以下命令：

git clone --bare --mirror https://qpm-git.qualcomm.com/home2/git/revision-history/qualcomm_linux-spf-1-0-le-qclinux-1-0-r1_api-linux_history_prebuilts.git <workspace_path>/downloads/git2/qpm-git.qualcomm.com.home2.git.revision-history.qualcomm_linux-spf-1-0-le-qclinux-1-0-r1_api-linux_history_prebuilts.git
        touch <workspace_path>/downloads/git2/qpm-git.qualcomm.com.home2.git.revision-history.qualcomm_linux-spf-1-0-le-qclinux-1-0-r1_api-linux_history_prebuilts.git.done
        Copy to clipboard

    創建 .done 檔案後，繼續執行 `bitbake <image recipe>` 命令。完成初始構建後，建議設置自己的 [下載目錄](https://docs.yoctoproject.org/4.0.16/singleindex.html#term-DL_DIR)。
- **make[4]: /bin/sh: Argument list too long**

    當工作區的路徑超過 90 個字元時會發生此情況。減少工作區路徑長度以避免此失敗。
- **kernel-source/arch/arm64/boot/dts/qcom/qcm6490-idp.dts:8:10: fatalerror: dt-bindings/iio/qcom,spmi-adc7-pmk8350.h: No such file ordirectory**

    問題檔案 `qcom,spmi-adc7-pmk8350.h`   是內核源 `<kernel-src>/include/dt-bindings/iio/qcom,spmi-adc7-pmk8350.h` 的一部分。

    檢查工作區是否有此檔案並初始化環境以選擇此檔案。在編譯 dtbs 時，內核構建系統運行 GCC 預處理器以用其定義替換 dts 檔案中的宏。所述路徑是多個 `includes` 所在的地方之一。

    檢查您的 git 配置中是否將 `core.symlinks` 設置為 `false`。如果是，將其設置為 true：

git config --global core.symlinks true
        Copy to clipboard
- **qpm-git.qualcomm.com.home2.git.revision-history.qualcomm\_linux-spf-1-0-le-qclinux-1-0-r1\_api-linux\_history\_prebuilts.git–progress failed with exit code 128, no output**

    128 是一個掩碼錯誤，這個錯誤需要進一步排查，因為它可能是您的網路問題或訪問 Qualcomm 或上游鏡像的真實問題。作為此錯誤的解決方法，請參見 [BitBake Fetcher Error](https://docs.qualcomm.com/doc/80-70018-254T/topic/troubleshoot_sync_build_and_flash.html#do-fetch-error-1)。您可以按照後續指示進一步排查，並在獲取期間轉儲詳細日誌。

    預設情況下，Yocto git fetch 不啟用詳細日誌記錄。要為所有 git 專案啟用詳細日誌記錄，請編輯 `local.conf` 檔案並將 `BB_GIT_VERBOSE_FETCH` 值更改為 **1**。您也可以為每個配方啟用詳細日誌記錄。例如，要啟用詳細日誌記錄並偵錯 diag 配方中的 `do_fetch()` 失敗，請執行以下步驟：

    1. 編輯 `layers/meta-qcom-hwe/recipes-bsp/diag/daig_15.0.bb` 並添加行 `BB_GIT_VERBOSE_FETCH = "1"`。
    2. 使用 `bitbake -fc cleanall diag` 清理先前下載的工件。
    3. 使用 `bitbake -fc fetch diag` 再次獲取原始碼。
    4. 在 diag 配方的工作目錄 `build-qcom-wayland/tmp-glibc/work/qcm6490-qcom-linux/diag/15.0-r0/temp` 下獲取具有詳細日誌記錄的日誌。
    5. 與 Qualcomm 支持團隊共享此路徑中的 `log.do_fetch`。

備註

為所有配方啟用 git 詳細日誌記錄會顯著增加構建時間。建議僅在需要的配方中根據需要啟用。
- **Failed SP Download with error: &lt;&gt; Sp Download failed. ExitCode: 128 Signal: 0 with errorcode 4**

    **錯誤摘錄**

warning: redirecting to https://git-na-ssl.chipcode.qti.qualcomm.com/57f0ec058e47f7a82b2de7b95111c74a/qualcomm/qualcomm-linux-spf-1-0_ap_standard_oem_nomodem.git/
        remote: Counting objects: 129803, done.
        remote: Compressing objects: 100% (114948/114948), done.
        fatal: write error: No space left on device5 GiB | 1.63 MiB/s
        fatal: fetch-pack: invalid index-pack output
        2024-03-02T14:32:18: Sync Command Failed
        [Error]: Failed SP Download with error: 2024-03-02T14:32:18: Sp Download failed. ExitCode: 128 Signal: 0 with errorcode 4
        [Error]: 2024-03-02T14:32:18: Sp Download failed. ExitCode: 128 Signal: 0
        Copy to clipboard

    **解決方案**

    錯誤日誌顯示裝置上沒有空間 **“fatal: write error: No space left on device”**。

    清理空間並重新觸發。
- **File “/usr/lib/python3.10/locale.py”, line 620, in setlocale return\_setlocale(category, locale)locale.Error: unsupported localesetting**

    要解決此錯誤，請運行以下命令並重新編譯：

sudo locale-gen en_US.UTF-8
        sudo update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8
        export LC_ALL=en_US.UTF-8
        export LANG=en_US.UTF-8
        Copy to clipboard
- **layer directories do not exist build-qcom-wayland/conf/../../layers/meta-qcom-qim-product-sdk**

    此錯誤發生的原因之一是：

    - `meta-qcom-qim-product-sdk` 的 Git 克隆未成功完成。
    - `meta-qcom-qim-product-sdk` 層未導出到 EXTRALAYERS。

    **錯誤摘錄**

xxxx@xxxx:~/github_un/build-qcom-wayland$ bitbake qcom-multimedia-image
        ERROR: The following layer directories do not exist:
        ERROR: <workspace_path>/build-qcom-wayland/conf/../../layers/meta-qcom-qim-product-sdk
        ERROR: Please check BBLAYERS in <workspace_path>/build-qcom-wayland/conf/bblayers.conf
        Copy to clipboard

    **解決方案**

    - 刪除 `build-qcom-wayland` 目錄。
    - 重新運行 [Build QIMP SDK image 中的命令](https://docs.qualcomm.com/doc/80-70018-254T/topic/github_workflow_unregistered_users.html#build-qimp-sdk-image-unreg)。
- **failed: database disk image is malformed. abort()ing pseudo client by server request**

    Pseudo 工具在處理檔案系統操作時會出現路徑不匹配和資料庫損壞問題。當 Pseudo 在 Yocto 專案中模擬檔案系統操作時，處理檔案路徑和權限時可能會出現問題。

    這是 [Yocto 社群](https://wiki.yoctoproject.org/wiki/Pseudo_Abort) 中的已知問題。

    **解決方案**

    運行以下命令：

rm -rf <workspace_path>/build-qcom-robotics-ros2-humble/tmp-glibc
        bitbake -c cleanall pseudo-native & bitbake pseudo-native
        ../qirp-build qcom-robotics-full-image
        Copy to clipboard
- **pyinotify.WatchManagerError: No space left on device (ENOSPC)**

    編譯觸發此錯誤。

    **解決方案**

    運行以下命令：

sudo su
        echo 1048576 > /proc/sys/fs/inotify/max_user_watches
        Copy to clipboard

## 燒錄

沒有已知錯誤。

Last Published: Aug 21, 2025

[Previous Topic
燒錄軟體影像](https://docs.qualcomm.com/bundle/publicresource/80-70018-254T/topics/flash_images.md) [Next Topic
操作指南](https://docs.qualcomm.com/bundle/publicresource/80-70018-254T/topics/how_to.md)