# 故障排除

## Docker

- “docker: Cannot connect to the Docker daemon at unix:///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/](https://registry-1.docker.io/v2/)”: http: server gave HTTP response to HTTPS client”

    1. 添加内部 Docker 注册表镜像（Qualcomm 网络的内部设置）。请勿在 JSON 配置文件中包含 # 注释。使用制表符代替空格和其他不可见的空白字符可能会破坏 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

Note

或者，您可以在 `/etc/docker/daemon.json` 中添加以下条目：

`"registry-mirrors": ["https://ccr.ccs.tencentyun.com"]`
    2. 重启 Docker 服务，获取新设置。

sudo systemctl restart docker
            Copy to clipboard
- “Failed to download from [https://download.docker.com](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. 切换到 Advanced 选项卡。
    3. 在 CPU Configuration 部分中，将 Virtualization Technology 设置为已启用。
    4. 保存并退出。
    5. 重新启动系统。
- “Permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock”

    当 `qsc-cli` 已安装在计算机上并且您不属于 Docker 组时，会发生这种情况。

    1. 添加到 Docker 组：

sudo groupadd docker
            sudo usermod -aG docker $USER
            newgrp docker
            Copy to clipboard
    2. 确认您是否属于 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
    3. 退出并再次登录以使访问权限生效。

# 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

    解决此错误的步骤如下：

    1. 删除旧的 `.repo` 文件夹。该文件夹位于您之前运行 `repo init` 命令的目录中。

rm -rf .repo
            Copy to clipboard
    2. 导出并运行 repo 命令以修复 repo 问题。REPO\_REV 必须指向 [https://gerrit.googlesource.com/git-repo](https://gerrit.googlesource.com/git-repo) 上游 ‘stable’ 分支的镜像分支。

export REPO_REV='aosp/stable'
            Copy to clipboard
- “Install repo “Server certificate verification failed””

    - 如果显示证书错误，例如“Server certificate verification failed.CAfile: none CRLfile: none”，则使用 Git 配置将 Git 配置为禁用 SSL 证书验证。咨询 IT 管理部门，以获取进一步的指导。您可以使用以下任一命令来禁用 SSL：

export GIT_SSL_NO_VERIFY=1
            git config --global http.sslverify false
            Copy to clipboard
    - 如果您所在的地区禁止访问 `android.googlesource`，尝试以下配置从 CodeLinaro Mirror 获取 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 or resource busy”

    当您的 gitconfig 未设置 UI 颜色配置时，会发生此错误。Git 1.8.4 及更高版本会默认设置此配置。运行以下命令，以在您的帐户中启用彩色显示：

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

    QSC CLI 在 home 目录中只使用几千字节 (kB)。从 home 目录中清理出几兆字节 (MB) 的空间。
- “[Error]: The “path” argument must be of type string.Received undefined”

    **错误摘要**

qsc-cli chip-software 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:
        qsc-cli tool uninstall qualcomm_launcher
        Copy to clipboard
- “docker: Error response from daemon: error while creating mount source 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 设置 home 目录的方式所致。请与 IT 管理员合作，对 home 目录进行任何进一步的更改。
- “fatal: couldn’t find remote ref refs/heads/qcom-linuxSTXscarthgap”

    如果在从 PDF 复制命令时看到任何杂散字符，删除这些杂散字符或将其替换为适当的符号，然后重新运行该命令。

    **示例**

# Replace the following command
        repo init -u https://github.com/quic-yocto/qcom-manifest -b qcom-linuxSTXscarthgap -m qcom-6.6.90-QLI.1.5-Ver.1.1.xml
        # with
        repo init -u https://github.com/quic-yocto/qcom-manifest -b qcom-linux-scarthgap -m qcom-6.6.90-QLI.1.5-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 terminal found, 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 chip-software 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 URL from 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

    例如，对于 `qualcomm_linux-spf-1-0-le-qclinux-1-0-r1_api-linux_history_prebuilts.git`，当 `do_fetch` 失败，运行以下命令：

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: fatal error: dt-bindings/iio/qcom,spmi-adc7-pmk8350.h: No such file or directory”

    `qcom,spmi-adc7-pmk8350.h` 文件是内核源代码 `<kernel-src>/include/dt-bindings/iio/qcom,spmi-adc7-pmk8350.h` 的一部分。

    1. 检查此文件的工作区并初始化环境以选择此文件。在编译 dtbs 时，内核编译系统运行 GCC 预处理器，以使用其定义替换 dts 文件中的宏。所述路径正是多个 `includes` 文件所在的位置之一。
    2. 检查你是否在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 错误](https://docs.qualcomm.com/doc/80-70020-254Y/topic/troubleshoot_sync_build_and_flash.html#do-fetch-error-1)。您可以按照后续说明在获取期间转储详细日志，以对其进行进一步分类。

    默认情况下，Yocto git fetch未启用详细日志。为所有recipe启用 git 详细日志会显著增加编译时间。建议仅在需要时在所需配方中启用它。要为所有 git 项目启用相同功能，请编辑 `local.conf` 文件并将 `BB_GIT_VERBOSE_FETCH` 值更改为 **1**。您还可以为每个配方启用详细日志记录。例如，要启用详细日志并在 diag recipe 中调试 `do_fetch()` 失败，可执行以下步骤：

    1. 编辑 `layers/meta-qcom-hwe/recipes-bsp/diag/daig_15.0.bb` 并添加这行 `BB_GIT_VERBOSE_FETCH = "1"`。
    2. 使用 `bitbake -fc cleanall diag` 清理先前下载的artifacts。
    3. 使用 `bitbake -fc fetch diag` 再次获取源码。
    4. 获取日志，详细日志记录位于 diag recipe 工作目录 `build-qcom-wayland/tmp-glibc/work/qcm6490-qcom-linux/diag/15.0-r0/temp`。
    5. 将路径下的 `log.do_fetch` 分享给Qualcomm 支持团队。
- “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 locale setting”

    要解决此错误，可运行以下命令并重新编译：

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

    **解决方案**

    1. 删除 `build-qcom-wayland` 目录。
    2. 重新运行[编译 Qualcomm IM SDK 镜像](https://docs.qualcomm.com/doc/80-70020-254Y/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 community](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: Jul 24, 2025

[Previous Topic
刷写软件镜像](https://docs.qualcomm.com/bundle/publicresource/80-70020-254Y/topics/flash_images.md) [Next Topic
方法](https://docs.qualcomm.com/bundle/publicresource/80-70020-254Y/topics/how_to.md)