Score:0

dpkg: error processing package git-lfs (--configure)

in flag

getting a dpkg error with git-lfs -

dpkg: error processing package git-lfs (--configure):
 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 --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

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.

ec flag
**Welcome to the Ubuntu Ask community.** To make it easier to diagnose your issue, please edit your question to include the version of the Ubuntu OS that you're running. Thanks
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.