LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   I fudged up my Ubuntu and I'm unable to fix it (https://www.linuxquestions.org/questions/linux-newbie-8/i-fudged-up-my-ubuntu-and-im-unable-to-fix-it-4175668940/)

androidnoob 02-03-2020 10:32 PM

I fudged up my Ubuntu and I'm unable to fix it
 
Hi!

First, I'm sorry for such a vague and undescriptive title – I'm not sure how to concisely describe this problem in just the handful of words that a title demands. I considered using "I dug a hole and can't get out", but that would be even less descriptive than the current one. This is probably because of a whole lot of errors and mistakes on my part over a long period of time, that has now accumulated. I'll give as much info as I can, and please let me know if I must provide anything more.

I am on Ubuntu 18.04.

Anyway:
In my quest to be able to access my phone's files through Nautilus, I installed some MTP stuff, without success. One of the answers I found suggested I reinstall Nautilus. Well, I tried, but after a succesful uninstall, I'm unable to install it again.
Code:

$ sudo apt install nautilus
[sudo] password for androidnoob:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 nautilus : Depends: libnautilus-extension1a (= 1:3.26.3-0ubuntu4) but 1:3.26.4-0~ubuntu18.04.4 is to be installed
            Depends: nautilus-data (= 1:3.26.3-0ubuntu4) but 1:3.26.4-0~ubuntu18.04.4 is to be installed
E: Unable to correct problems, you have held broken packages.

By googling this error message, I tried
Code:

dpkg --get-selections | grep hold
, as per this answer, but it doesn't return anything. So according to that guy, it must be "something else". From the same page, I also tried sudo apt-get autoremove, also with no luck. I have also, of course, tried sudo apt update and sudo apt upgrade numerous time without any success.

Then I tried to install a different file manager, namely Dolphin:
Code:

$ sudo apt install dolphin
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package dolphin

Googling this gave me some repositories to add, but whenever I try to add these repositories, or even if I write an unknown command into bash (such as $ djkfkjdfkdsf), I get a lot of Python(?!) error messages, different traces depending on the command I try to run, but ultimately always ending up in:
Code:

ModuleNotFoundError: No module named 'apt_pkg'
Googling this error have taken me on quite an adventure. I've spent a lot of time in /usr/lib/python3/dist_packages, trying to create symlinks as suggested by dozens of answers online (many of which refer to this post). I think part of my problem here, is that I don't even have that .so file we're creating a symlink to, so all my links are dead. I've tried installing, removing, reinstalling, ... all the suggestions I've found googling this, even searched manually for the correct .so file, but with no luck.

I've had a lot of problems with apt repos earlier, and with installing Python 3.8 (which I've now uninstalled again), so there might be some old dirt lying in the background here from my presumably poor patches. I don't know. I'm really most of all tempted to just backup my home folder to an external drive (which is going to be another adventure without a file manager...), and install a fresh OS.

Does anyone here have any suggestions as to what to try next?
I feel like I have googled all the error messages, and gotten absolutely nowhere. Right now this Python error with apt_pkg.so is a big roadblock, I feel.

Words of consolation are also welcome.

If you got all the way here to the end, thank you so much for reading, and thank you in advance for your suggestions!

cordx 02-04-2020 06:28 AM

this page has the same nautilus unmet dependencies that you have. they claimed to be able to fix that situation by following the advice found here. if you choose to follow them as well, please take note of the beginning where you are shown how to back up some important configuration files just in case.

building on that, it would be helpful to figure out a backup method that would have helped you after uninstalling nautilus. timeshift is my preferred system restore method, but there are plenty to choose from.

greencedar 02-04-2020 06:41 AM

Quote:

Originally Posted by androidnoob (Post 6085976)
Hi!

I've had a lot of problems with apt repos earlier, and with installing Python 3.8 (which I've now uninstalled again), so there might be some old dirt lying in the background here from my presumably poor patches. I don't know. I'm really most of all tempted to just backup my home folder to an external drive (which is going to be another adventure without a file manager...), and install a fresh OS.

Does anyone here have any suggestions as to what to try next?
I feel like I have googled all the error messages, and gotten absolutely nowhere. Right now this Python error with apt_pkg.so is a big roadblock, I feel.

Words of consolation are also welcome.

If you got all the way here to the end, thank you so much for reading, and thank you in advance for your suggestions!

Based on what you have tried, and you have tried a lot, I would backup my folder in an external Hard Drive as your suggested and install a fresh OS.

For your consolation, I too use Ubuntu 18.04, Bionic Beaver, and it has served me very well. My problems have been minimal. Without knowing your full system information, it almost seems to me the apt repos' may be the problem and has corrupted your OS.

Keep us informed and best of luck.

greencedar

yancek 02-04-2020 07:55 AM

I'd have to agree with the recommendation by greencedar. The system appears to be messed up beyond repair particularly for someone fairly new. Not sure what site would recommend removing the default file manager when you can't access files on a phone. I think you came to the game too late and if you had come here and asked about the problem of accessing files (on whatever type phone you have) it would have been a simpler problem to resolve.

I don't use Ubuntu regularly but do have an install of 18.04 and had no problem accessing file on an iphone so I'm not sure what happened in your case. You haven't indicated what type phone you are using. Since android is sort of Linux I would expect that to be easier to access if that's what you are using. And for future reference when you post, it's always a good idea to post a link to any tutorials you used so members here can take a look. Many members here with very comprehensive knowledge of Linux/computers in general. Good luck.

JeremyBoden 02-04-2020 08:20 AM

Even if you get it working, there are probably going to be things lurking around that will cause a future upgrade to fail in some unknown manner.

When you are in a hole - stop digging!


All times are GMT -5. The time now is 01:10 PM.