2

I downloaded glib-2.76.3.tar.xz from https://download.gnome.org/sources/glib/2.76/

Extracted the file and opened the INSTALL.md inside of it.

Here's an excerpt of it:

Simple install procedure
========================

```sh
tar xf glib-*.tar.gz                    # unpack the sources
cd glib-*                               # change to the toplevel directory
meson _build                            # configure the build
ninja -C _build                         # build GLib

# Become root if necessary

ninja -C _build install                 # install GLib

I ran sh on terminal, but when I run tar xf glib-*.tar.gz it throws error:

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

As I understand I have to write something instead of the * but I don't know what exactly.

tar xf glib-2.76.3.tar.gz throws the same type of error. Maybe I'm in the wrong directory also?

Gimper
  • 31
  • 5
  • 1
    If you downloaded the `.xz` compressed archive rather than the `.gz` compressed archive, your need to modify the filename in the `tar` command accordingly i.e. `tar xf glib-*.tar.xz` – steeldriver May 31 '23 at 13:01

1 Answers1

2

The documentation is clearly wrong on several details, since it states a .gz extension, but the actual file has an .xz extension.

So if you're in the directory where the file is located, you can run:

tar xf glib-*.tar.xz

Or you can run the exact filename:

tar xf ./glib-2.76.3.tar.xz

Instead of the . you can also specify the full path, like this:

tar xf /path/to/glib-2.76.3.tar.xz

Also for the next command (cd) use: (here the cd glib-* will not work)

cd glib-2.76.3

Or full path again:

cd /path/to/glib-2.76.3

I cases like this, documentation should be seen as guidance, that can contain errors - always double check with common sense.

Artur Meinild
  • 21,605
  • 21
  • 56
  • 89
  • Note that using the wildcard for the tarball assumes there's only one matching filename. It might work with `cd` too if you append a trailing slash, that should make the shell match only directories (thus skipping the tarball), i.e. `cd glib-*/`. – ilkkachu Jun 01 '23 at 07:39