getting a dpkg error with git-lfs -
dpkg: error processing package git-lfs (
installed git-lfs package post-installation script subprocess returned error exit status 2
Earlier it shows -
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) ...
Tried -
- sudo rm /var/lib/dpkg/info/*git-lfs*
- sudo dpkg --configure -D 777 git-lfs
- sudo apt -f install
Same result.
Building in a dockerized Ubuntu jammy container.
Additionally I tried adding to the build job -
- 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
And that returned -
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
dpkg: error processing package git-lfs (
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
Also tried the subsequent suggestion -
git lfs install --force
Any suggestions here?
edit: As a workaround holding back the package unblocks the build -
- sudo apt-mark hold git-lfs
- sudo apt-get -y upgrade
Thanks.