Deleted /etc/apt, now apt-get gives a relocation error? [duplicate]
Clash Royale CLAN TAG#URR8PPP
up vote
4
down vote
favorite
This question already has an answer here:
How to reinstall apt on Debian?
2 answers
I was trying to delete the sources.list
file for apt
. After deleting, instead of issuing cd /etc/apt
, I did sudo rm - r /etc/apt
and now I've deleted it. I tried creating the /etc/apt
directory again and running:
$ sudo apt-get update && apt-get upgrade
This returns an error message as follows:
apt-get: relocation error: /usr/lib/x86_64-linux-gnu/libapt-private.so.0.0: symbol _ZTI17pkgAcquireStatus2, version APTPKG_5.0 not defined in file libapt-pkg.so.5.0 with link time reference
How do I restore my /etc/apt
directory and fix apt
?
debian ubuntu linux-mint apt
marked as duplicate by Romeo Ninov, G-Man, Jesse_b, SatÃ
 Katsura, Timothy Martin Feb 27 at 18:13
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
 |Â
show 1 more comment
up vote
4
down vote
favorite
This question already has an answer here:
How to reinstall apt on Debian?
2 answers
I was trying to delete the sources.list
file for apt
. After deleting, instead of issuing cd /etc/apt
, I did sudo rm - r /etc/apt
and now I've deleted it. I tried creating the /etc/apt
directory again and running:
$ sudo apt-get update && apt-get upgrade
This returns an error message as follows:
apt-get: relocation error: /usr/lib/x86_64-linux-gnu/libapt-private.so.0.0: symbol _ZTI17pkgAcquireStatus2, version APTPKG_5.0 not defined in file libapt-pkg.so.5.0 with link time reference
How do I restore my /etc/apt
directory and fix apt
?
debian ubuntu linux-mint apt
marked as duplicate by Romeo Ninov, G-Man, Jesse_b, SatÃ
 Katsura, Timothy Martin Feb 27 at 18:13
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
6
/etc/apt
should be a directory;sudo rm /etc/apt
therefor shouldn't actually do anything other than print an error message.
â derobert
Feb 26 at 17:11
Is this Debian, Ubuntu or Mint? You've tagged all three.
â roaima
Feb 26 at 21:45
@derobert sorry I usedrm -r
â void
Feb 27 at 15:10
Ok â something else is also wrong with the system, as not having/etc/apt
results in no errors, but some warnings likeW: Unable to read /etc/apt/apt.conf.d/ - DirectoryExists (2: No such file or directory)
(at least on Buster). I think the suggestion of reinstalling apt is a good place to start...
â derobert
Feb 27 at 16:59
BTW: When you mistakenlysudo rm -r /etc/apt
, were you trying to fix some other problem?
â derobert
Feb 27 at 17:05
 |Â
show 1 more comment
up vote
4
down vote
favorite
up vote
4
down vote
favorite
This question already has an answer here:
How to reinstall apt on Debian?
2 answers
I was trying to delete the sources.list
file for apt
. After deleting, instead of issuing cd /etc/apt
, I did sudo rm - r /etc/apt
and now I've deleted it. I tried creating the /etc/apt
directory again and running:
$ sudo apt-get update && apt-get upgrade
This returns an error message as follows:
apt-get: relocation error: /usr/lib/x86_64-linux-gnu/libapt-private.so.0.0: symbol _ZTI17pkgAcquireStatus2, version APTPKG_5.0 not defined in file libapt-pkg.so.5.0 with link time reference
How do I restore my /etc/apt
directory and fix apt
?
debian ubuntu linux-mint apt
This question already has an answer here:
How to reinstall apt on Debian?
2 answers
I was trying to delete the sources.list
file for apt
. After deleting, instead of issuing cd /etc/apt
, I did sudo rm - r /etc/apt
and now I've deleted it. I tried creating the /etc/apt
directory again and running:
$ sudo apt-get update && apt-get upgrade
This returns an error message as follows:
apt-get: relocation error: /usr/lib/x86_64-linux-gnu/libapt-private.so.0.0: symbol _ZTI17pkgAcquireStatus2, version APTPKG_5.0 not defined in file libapt-pkg.so.5.0 with link time reference
How do I restore my /etc/apt
directory and fix apt
?
This question already has an answer here:
How to reinstall apt on Debian?
2 answers
debian ubuntu linux-mint apt
edited Mar 4 at 15:27
Jeff Schaller
31.2k846105
31.2k846105
asked Feb 26 at 16:39
void
1235
1235
marked as duplicate by Romeo Ninov, G-Man, Jesse_b, SatÃ
 Katsura, Timothy Martin Feb 27 at 18:13
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
marked as duplicate by Romeo Ninov, G-Man, Jesse_b, SatÃ
 Katsura, Timothy Martin Feb 27 at 18:13
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
6
/etc/apt
should be a directory;sudo rm /etc/apt
therefor shouldn't actually do anything other than print an error message.
â derobert
Feb 26 at 17:11
Is this Debian, Ubuntu or Mint? You've tagged all three.
â roaima
Feb 26 at 21:45
@derobert sorry I usedrm -r
â void
Feb 27 at 15:10
Ok â something else is also wrong with the system, as not having/etc/apt
results in no errors, but some warnings likeW: Unable to read /etc/apt/apt.conf.d/ - DirectoryExists (2: No such file or directory)
(at least on Buster). I think the suggestion of reinstalling apt is a good place to start...
â derobert
Feb 27 at 16:59
BTW: When you mistakenlysudo rm -r /etc/apt
, were you trying to fix some other problem?
â derobert
Feb 27 at 17:05
 |Â
show 1 more comment
6
/etc/apt
should be a directory;sudo rm /etc/apt
therefor shouldn't actually do anything other than print an error message.
â derobert
Feb 26 at 17:11
Is this Debian, Ubuntu or Mint? You've tagged all three.
â roaima
Feb 26 at 21:45
@derobert sorry I usedrm -r
â void
Feb 27 at 15:10
Ok â something else is also wrong with the system, as not having/etc/apt
results in no errors, but some warnings likeW: Unable to read /etc/apt/apt.conf.d/ - DirectoryExists (2: No such file or directory)
(at least on Buster). I think the suggestion of reinstalling apt is a good place to start...
â derobert
Feb 27 at 16:59
BTW: When you mistakenlysudo rm -r /etc/apt
, were you trying to fix some other problem?
â derobert
Feb 27 at 17:05
6
6
/etc/apt
should be a directory; sudo rm /etc/apt
therefor shouldn't actually do anything other than print an error message.â derobert
Feb 26 at 17:11
/etc/apt
should be a directory; sudo rm /etc/apt
therefor shouldn't actually do anything other than print an error message.â derobert
Feb 26 at 17:11
Is this Debian, Ubuntu or Mint? You've tagged all three.
â roaima
Feb 26 at 21:45
Is this Debian, Ubuntu or Mint? You've tagged all three.
â roaima
Feb 26 at 21:45
@derobert sorry I used
rm -r
â void
Feb 27 at 15:10
@derobert sorry I used
rm -r
â void
Feb 27 at 15:10
Ok â something else is also wrong with the system, as not having
/etc/apt
results in no errors, but some warnings like W: Unable to read /etc/apt/apt.conf.d/ - DirectoryExists (2: No such file or directory)
(at least on Buster). I think the suggestion of reinstalling apt is a good place to start...â derobert
Feb 27 at 16:59
Ok â something else is also wrong with the system, as not having
/etc/apt
results in no errors, but some warnings like W: Unable to read /etc/apt/apt.conf.d/ - DirectoryExists (2: No such file or directory)
(at least on Buster). I think the suggestion of reinstalling apt is a good place to start...â derobert
Feb 27 at 16:59
BTW: When you mistakenly
sudo rm -r /etc/apt
, were you trying to fix some other problem?â derobert
Feb 27 at 17:05
BTW: When you mistakenly
sudo rm -r /etc/apt
, were you trying to fix some other problem?â derobert
Feb 27 at 17:05
 |Â
show 1 more comment
1 Answer
1
active
oldest
votes
up vote
5
down vote
accepted
I have referenced this post. Perhaps it can help you?
cd /var/cache/apt/archives
Now look for a .deb
with apt in its name, if you are running Debian Stretch on a 64-bit system it should be apt_1.4.8_amd64.deb
. Use tab to autocomplete, or if not found you can download apt
and its dependencies here.
After you have located the necessary package run:
dpkg -i apt[name of package, tab completes help here].deb
This should reinstall the apt for you. The error about missing /usr/lib/x86_64-linux-gnu/libapt-private.so.0.0
should be solved if not you can install the lib from here.
Then you need to copy the library into /usr/lib and run this command as root(sudo).
ldconfig -n -v /usr/lib
Good luck! As mentioned by user George Udosen this post may help too
Thanks for the answer I haven't yet tried it out! I'll update!
â void
Feb 28 at 4:38
add a comment |Â
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
5
down vote
accepted
I have referenced this post. Perhaps it can help you?
cd /var/cache/apt/archives
Now look for a .deb
with apt in its name, if you are running Debian Stretch on a 64-bit system it should be apt_1.4.8_amd64.deb
. Use tab to autocomplete, or if not found you can download apt
and its dependencies here.
After you have located the necessary package run:
dpkg -i apt[name of package, tab completes help here].deb
This should reinstall the apt for you. The error about missing /usr/lib/x86_64-linux-gnu/libapt-private.so.0.0
should be solved if not you can install the lib from here.
Then you need to copy the library into /usr/lib and run this command as root(sudo).
ldconfig -n -v /usr/lib
Good luck! As mentioned by user George Udosen this post may help too
Thanks for the answer I haven't yet tried it out! I'll update!
â void
Feb 28 at 4:38
add a comment |Â
up vote
5
down vote
accepted
I have referenced this post. Perhaps it can help you?
cd /var/cache/apt/archives
Now look for a .deb
with apt in its name, if you are running Debian Stretch on a 64-bit system it should be apt_1.4.8_amd64.deb
. Use tab to autocomplete, or if not found you can download apt
and its dependencies here.
After you have located the necessary package run:
dpkg -i apt[name of package, tab completes help here].deb
This should reinstall the apt for you. The error about missing /usr/lib/x86_64-linux-gnu/libapt-private.so.0.0
should be solved if not you can install the lib from here.
Then you need to copy the library into /usr/lib and run this command as root(sudo).
ldconfig -n -v /usr/lib
Good luck! As mentioned by user George Udosen this post may help too
Thanks for the answer I haven't yet tried it out! I'll update!
â void
Feb 28 at 4:38
add a comment |Â
up vote
5
down vote
accepted
up vote
5
down vote
accepted
I have referenced this post. Perhaps it can help you?
cd /var/cache/apt/archives
Now look for a .deb
with apt in its name, if you are running Debian Stretch on a 64-bit system it should be apt_1.4.8_amd64.deb
. Use tab to autocomplete, or if not found you can download apt
and its dependencies here.
After you have located the necessary package run:
dpkg -i apt[name of package, tab completes help here].deb
This should reinstall the apt for you. The error about missing /usr/lib/x86_64-linux-gnu/libapt-private.so.0.0
should be solved if not you can install the lib from here.
Then you need to copy the library into /usr/lib and run this command as root(sudo).
ldconfig -n -v /usr/lib
Good luck! As mentioned by user George Udosen this post may help too
I have referenced this post. Perhaps it can help you?
cd /var/cache/apt/archives
Now look for a .deb
with apt in its name, if you are running Debian Stretch on a 64-bit system it should be apt_1.4.8_amd64.deb
. Use tab to autocomplete, or if not found you can download apt
and its dependencies here.
After you have located the necessary package run:
dpkg -i apt[name of package, tab completes help here].deb
This should reinstall the apt for you. The error about missing /usr/lib/x86_64-linux-gnu/libapt-private.so.0.0
should be solved if not you can install the lib from here.
Then you need to copy the library into /usr/lib and run this command as root(sudo).
ldconfig -n -v /usr/lib
Good luck! As mentioned by user George Udosen this post may help too
edited Feb 26 at 17:02
answered Feb 26 at 17:00
kemotep
1,0941616
1,0941616
Thanks for the answer I haven't yet tried it out! I'll update!
â void
Feb 28 at 4:38
add a comment |Â
Thanks for the answer I haven't yet tried it out! I'll update!
â void
Feb 28 at 4:38
Thanks for the answer I haven't yet tried it out! I'll update!
â void
Feb 28 at 4:38
Thanks for the answer I haven't yet tried it out! I'll update!
â void
Feb 28 at 4:38
add a comment |Â
6
/etc/apt
should be a directory;sudo rm /etc/apt
therefor shouldn't actually do anything other than print an error message.â derobert
Feb 26 at 17:11
Is this Debian, Ubuntu or Mint? You've tagged all three.
â roaima
Feb 26 at 21:45
@derobert sorry I used
rm -r
â void
Feb 27 at 15:10
Ok â something else is also wrong with the system, as not having
/etc/apt
results in no errors, but some warnings likeW: Unable to read /etc/apt/apt.conf.d/ - DirectoryExists (2: No such file or directory)
(at least on Buster). I think the suggestion of reinstalling apt is a good place to start...â derobert
Feb 27 at 16:59
BTW: When you mistakenly
sudo rm -r /etc/apt
, were you trying to fix some other problem?â derobert
Feb 27 at 17:05