nsg / snap-minecraft

Make a snap that downloads and setup Minecraft
MIT License
4 stars 5 forks source link

Installing Java doesn't work on newly installed Ubuntu 18.04 #3

Closed PJaros closed 3 years ago

PJaros commented 6 years ago

Installing Java fails with the following error:

madmike@ubuntu-desktop:~$ snap run minecraft-nsg Can't create dir /home/madmike/Desktop Can't create dir /home/madmike/Templates Can't create dir /home/madmike/Public Can't create dir /home/madmike/Documents Can't create dir /home/madmike/Music Can't create dir /home/madmike/Pictures Gtk-Message: Failed to load module "canberra-gtk-module" Downloading Oracle Java wget: Cannot read /etc/wgetrc (Permission denied). --2018-10-03 22:23:44-- http://download.oracle.com/otn-pub/java/jdk/8u151-b12/e758a0de34e24606bca991d704f6dcbf/jdk-8u151-linux-x64.tar.gz Resolving download.oracle.com (download.oracle.com)... 23.211.4.135 Connecting to download.oracle.com (download.oracle.com)|23.211.4.135|:80... connected. HTTP request sent, awaiting response... 302 Moved Temporarily Location: https://edelivery.oracle.com/otn-pub/java/jdk/8u151-b12/e758a0de34e24606bca991d704f6dcbf/jdk-8u151-linux-x64.tar.gz [following] --2018-10-03 22:23:44-- https://edelivery.oracle.com/otn-pub/java/jdk/8u151-b12/e758a0de34e24606bca991d704f6dcbf/jdk-8u151-linux-x64.tar.gz Resolving edelivery.oracle.com (edelivery.oracle.com)... 2a02:26f0:f3:59b::2d3e, 2a02:26f0:f3:588::2d3e, 23.50.102.97 Connecting to edelivery.oracle.com (edelivery.oracle.com)|2a02:26f0:f3:59b::2d3e|:443... connected. HTTP request sent, awaiting response... 302 Moved Temporarily Location: http://download.oracle.com/otn-pub/java/jdk/8u151-b12/e758a0de34e24606bca991d704f6dcbf/jdk-8u151-linux-x64.tar.gz?AuthParam=1538598344_b8a9e99c04a2a78fd5d986b8ec48b66a [following] --2018-10-03 22:23:44-- http://download.oracle.com/otn-pub/java/jdk/8u151-b12/e758a0de34e24606bca991d704f6dcbf/jdk-8u151-linux-x64.tar.gz?AuthParam=1538598344_b8a9e99c04a2a78fd5d986b8ec48b66a Connecting to download.oracle.com (download.oracle.com)|23.211.4.135|:80... connected. HTTP request sent, awaiting response... 404 Not Found 2018-10-03 22:23:47 ERROR 404: Not Found.

Exception in thread Thread-1: Traceback (most recent call last): File "/snap/minecraft-nsg/13/usr/lib/python3.5/threading.py", line 914, in _bootstrap_inner self.run() File "/snap/minecraft-nsg/13/usr/lib/python3.5/threading.py", line 862, in run self._target(*self._args, **self._kwargs) File "/snap/minecraft-nsg/13/download-java.py", line 84, in download_thread dh = hashlib.sha256(open(DOWNLOAD_FILE, 'rb').read()).hexdigest() FileNotFoundError: [Errno 2] No such file or directory: 'jdk-8u151-linux-x64.tar.gz'

tar: jdk-*-linux-x64.tar.gz: Cannot open: No such file or directory tar: Error is not recoverable: exiting now

This is what happens if I try to install it with sudo:

madmike@ubuntu-desktop:~$ sudo snap run minecraft-nsg [sudo] Passwort für madmike: Can't create dir /root/Desktop Can't create dir /root/Downloads Can't create dir /root/Templates Can't create dir /root/Public Can't create dir /root/Documents Can't create dir /root/Music Can't create dir /root/Pictures Can't create dir /root/Videos mkdir: cannot create directory '/run/user/0': Permission denied No protocol specified Failed to connect to Mir: Failed to connect to server socket: No such file or directory Unable to init server: Could not connect: Connection refused No protocol specified Failed to connect to Mir: Failed to connect to server socket: No such file or directory Unable to init server: Could not connect: Connection refused

(download-java.py:5631): Gtk-CRITICAL : gtk_settings_get_for_screen: assertion 'GDK_IS_SCREEN (screen)' failed /snap/minecraft-nsg/13/usr/lib/python3/dist-packages/gi/overrides/init.py:326: Warning: g_object_get_qdata: assertion 'G_IS_OBJECT (object)' failed return super_init_func(self, new_kwargs) /snap/minecraft-nsg/13/launch: line 15: 5631 Segmentation fault (core dumped) $SNAP/download-java.py

PJaros commented 6 years ago

https://github.com/jacobzimmermann/omegat-cat-snap is based on Java8, maybe you could find some hitns there? I know how to build docker-images. But snap is very new for me.

nsg commented 6 years ago

See my comments in this issue: https://github.com/nsg/snap-minecraft/issues/2

nsg commented 6 years ago

Oh, I just noticed that the minecraft snap from snapcrafters has been removed. Leaving mine the only one left, with no options left I will consider fixing this.

nsg commented 3 years ago

Closing this old issue to clean up, it you haven't found it already I'm using mc-installer these days for my minecraft needs.