Wednesday, May 1, 2024
 Popular · Latest · Hot · Upcoming
1
rated 0 times [  1] [ 0]  / answers: 1 / hits: 1478  / 3 Years ago, tue, july 13, 2021, 1:24:20

I had install Spotify a while back but since deleted some folder belonging to it (accidental rm- rf operation - sh*t happens).



I now can't install any software at all via apt-get (pip works fine)



When I run



sudo apt-get -f install


I get the following



>(Reading database ... 586089 files and directories currently installed.)
Preparing to unpack .../spotify-client_1%3a0.9.11.26.g995ec04.78-1_amd64.deb ...
/var/lib/dpkg/info/spotify-client.prerm: 9: cd: can't cd to /opt/spotify/spotify-client
dpkg: warning: subprocess old pre-removal script returned error exit status 2
dpkg: trying script from the new package instead ...
/var/lib/dpkg/tmp.ci/prerm: 9: cd: can't cd to /opt/spotify/spotify-client
dpkg: error processing archive /var/cache/apt/archives/spotify-client_1%3a0.9.11.26.g995ec04.78-1_amd64.deb (--unpack):
subprocess new pre-removal script returned error exit status 2
/var/lib/dpkg/info/spotify-client.postinst: 5: cd: can't cd to /opt/spotify/spotify-client
dpkg: error while cleaning up:
subprocess installed post-installation script returned error exit status 2
Errors were encountered while processing:
/var/cache/apt/archives/spotify-client_1%3a0.9.11.26.g995ec04.78-1_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)


It says it cannot cd into /opt/spotify/spotify-client (because that's what I deleted)



Fix suggestions?



I am more than happy to entirely remove Spotify



I have tried all of the following



sudo apt-get autoremove
sudo apt-get autoclean
sudo apt-get install [some package] fails


All fail because it can't find the spotify-client



I have tried to remove it from /etc/apt/sources.list but no cigar


More From » apt

 Answers
1

The system tries to install Spotify. Create a directory /opt/spotify/spotify-client, owned by root, with permissions 755 and try again. If you accentally also deleted /opt/spotify, do the same for that directory. Then repeat sudo apt-get -f install, and sudo apt-get remove spotify.


[#24193] Wednesday, July 14, 2021, 3 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
anoalk

Total Points: 271
Total Questions: 90
Total Answers: 112

Location: Zambia
Member since Wed, Dec 16, 2020
3 Years ago
anoalk questions
Wed, Mar 15, 23, 04:06, 1 Year ago
Fri, Sep 24, 21, 02:59, 3 Years ago
Sat, Mar 5, 22, 02:33, 2 Years ago
Tue, Mar 22, 22, 07:19, 2 Years ago
;