1

So i was helping a friend of mine install wine so that she could play roblox, and something happened I remote controled her screen. I did sudo apt-get install wine-stable. It said it needed wine64 and when i tried installing it, it said it needed winelib, so i installed it and then tried instaallin wine64. When i did that, the command prompt started uninstalling things. Most her apps were gone. She restarted her computer and ubuntu started in some sort of command prompt mode. I told her to do alt f7 but it did not work. Her computer hen went black. What do i do. Feel free to ask details Note:she had her OS gui on when that happened

Ancaru
  • 19
  • You may be aware of the fact that on Ubuntu-17.10 and newer, GUI not comes on Ctrl+Alt+F1, or Ctrl+Alt+F2, https://askubuntu.com/a/157621/1107236 – turbulence Jul 25 '20 at 19:03
  • Possibly she need to set up network (https://help.ubuntu.com/community/NetworkConfigurationCommandLine/Automatic), and install ubuntu-desktop – turbulence Jul 25 '20 at 19:05
  • @turbulence she had her gui on, but linux started that time on command line mode. Added it to the question – Ancaru Jul 25 '20 at 19:09
  • 1
    If the network connectivity is there, you can try to install the package ubuntu-desktop. It should install the basic applications. – turbulence Jul 25 '20 at 19:59
  • Apparently the computer is 32bit so installing a 64bit package conflicted with existing packages. – turbulence Jul 25 '20 at 20:00
  • Yeah, GUI on newer versions using GDM is on CTRL+ALT+F1 or CTRL+ALT+F2 but if you are using ligtdm it should still be on CTRL+ALT+F7 – mchid Jul 25 '20 at 22:17
  • Also, did the system have nvidia drivers that were manually installed? – mchid Jul 25 '20 at 22:21

1 Answers1

0

Your /var/log/apt/history.log contains a list of all installed and uninstalled packages. You can use a few commands to make it easier to reinstall the packages without having to type out each package.

First, identify the packages. The following commands will list all the packages that were removed and will also create a file containing the list:

cd
cat /var/log/apt/history.log | grep -A3 "install wine64" | grep "Remove" | tee install-list

Now, we need to clean up the list so run the following command to remove the word "Remove," all the stuff within parentheses, and commas:

sed -e 's/Remove://g;s/([^)]*)//g;s/,//g' install-list

The list should consist of package names that may or may not include the architecture in a format similar to example-packagename:i386 anotherpackage-1-2.3:i386 awesome-packagename:i386 or maybe like this example-packagename:amd64 anotherpackage-1-2.3:amd64 awesome-packagename:amd64

If this list of uninstalled packages looks correct, run the following command to apply the changes (use the up arrow key to get to the last command and simply change sed -e to sed -i so you don't have to type it all over again:

sed -i 's/Remove://g;s/([^)]*)//g;s/,//g' install-list

Now to install the packages, run the following command but this time review the output before you accept the changes (it should list some packages to uninstall like amd64 packages and all the wine stuff):

sudo apt update
sudo apt install $(cat ./install-list)

Please post any errors.

mchid
  • 43,546
  • 8
  • 97
  • 150
  • I'm not exactly sure why this happened in the first place but if you try installing wine64 again, do not use sudo apt install -y and use apt install wine64 instead so you can review the changes before you accept. Then, you can go through the list and determine the problem or ask a question about it here to help figure out a solution for installation. – mchid Jul 25 '20 at 22:14