dpkg:处理软件包 git-lfs 时出错(--configure)

dpkg:处理软件包 git-lfs 时出错(--configure)

使用 git-lfs 时出现 dpkg 错误 -

dpkg: error processing package git-lfs (--configure):
 installed git-lfs package post-installation script subprocess returned error exit status 2

此前有报道称——

Preparing to unpack .../44-git-lfs_3.0.2-1ubuntu0.2_arm64.deb ...
Unpacking git-lfs (3.0.2-1ubuntu0.2) over (3.0.2-1) ...

已尝试

- sudo rm /var/lib/dpkg/info/*git-lfs*
- sudo dpkg --configure -D 777 git-lfs
- sudo apt -f install

结果相同。

在 dockerized Ubuntu jammy 容器中构建。

此外,我还尝试添加到构建作业中-

    - curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | os=ubuntu dist=jammy sudo -E bash
    - sudo apt-get -y install git-lfs

然后又回来了——

The following packages will be upgraded:
  git-lfs
1 upgraded, 0 newly installed, 0 to remove and 155 not upgraded.
Need to get 6,765 kB of archives.
After this operation, 5,213 kB of additional disk space will be used.
Get:1 https://packagecloud.io/github/git-lfs/ubuntu jammy/main arm64 git-lfs arm64 3.3.0 [6,765 kB]
Fetched 6,765 kB in 1s (6,960 kB/s)
debconf: delaying package configuration, since apt-utils is not installed
(Reading database ... 41753 files and directories currently installed.)
Preparing to unpack .../git-lfs_3.3.0_arm64.deb ...
Unpacking git-lfs (3.3.0) over (3.0.2-1) ...
Setting up git-lfs (3.3.0) ...
warning: error running /usr/lib/git-core/git 'config' '--includes' '--system' '--replace-all' 'filter.lfs.clean' 'git-lfs clean -- %f': 'error: could not write config file /etc/gitconfig: Device or resource busy' 'exit status 4'
Run `git lfs install --force` to reset Git configuration.
dpkg: error processing package git-lfs (--configure):
 installed git-lfs package post-installation script subprocess returned error exit status 2
Processing triggers for man-db (2.10.2-1) ...
Errors were encountered while processing:
 git-lfs

还尝试了后续建议 -

git lfs install --force

这里有什么建议吗?

编辑:作为一种解决方法,阻止软件包解除构建阻碍 -

- sudo apt-mark hold git-lfs
- sudo apt-get -y upgrade

谢谢。

相关内容