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?

1
  • 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 May 31 at 13:01

1 Answer 1

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.

1
  • 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 1 at 7:39

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .