Hello,

I have installed auto-apt using instructions:

https://help.ubuntu.com/community/AutoApt

but the problem is I cannot execute it

bash: apt-file: command not found

probably it could be in some directory, but there is not in enviroment variable. So how can I find where it is inslled?

Dani AI

Generated

Good outcome — the original problem turned out to be that the helper program wasn’t installed. The useful bits to keep in mind for future readers: apt-file is meant to search the contents of packages (which package supplies a given file), while package-name/description searches use the package index. apt-file needs those “Contents” indices available before it can answer file queries. (manpages.org)

Quick, practical checks to run if a command prints “not found” or to locate where a package put its files:

# see if a binary is visible to the shell
command -v apt-file || type -a apt-file || whereis apt-file

# check package/install status and list files
dpkg -s apt-file
dpkg -L auto-apt

# find what package owns a given installed file
dpkg -S /path/to/some/file

Each of the dpkg forms is the standard way to inspect installed packages and their file lists. Use these to confirm whether a package is installed and where its files live on disk. (tldp.org)

Notes about apt-file behavior and common pitfalls: apt-file pulls “Contents” files from the repositories configured on the system, so it won’t find files that only exist in one-off .deb installs or in repos that don’t publish Contents indexes. Keeping the apt-file indices current is required for useful results (the tool and its configuration handle which Contents files get fetched). If the package is installed but the command still isn’t found, check PATH and shell hashing (start a new shell or run a hash refresh), or list the package files to verify an executable was actually placed under a bin directory. (manpages.org)

Credit: ’s note about the different search tools pointed in the right direction, and ’s path hint is exactly the kind of thing to confirm with the dpkg listing above.

Recommended Answers

All 3 Replies

The command to search for packages is apt-cache search, not apt-file. It does not need root permission to run, unlike apt-get. According to the instructions of the page you gave, auto-apt search would work for this utility.

auto-apt get installed into /usr/lib/auto-apt You should see it there.

I can install this on Mint 13 with no issues.

Do you not have this file?

I was reading this:
https://help.ubuntu.com/community/CompilingEasyHowTo

and did not do this:

You probably want to read about the possibilities and limitations of auto-apt first, which will attempt to take care of dependency issues automatically. The following instructions are for fulfilling dependencies manually:
To prepare, install the package apt-file, and then run sudo apt-file update.

so thats why it was not found, needed to install first apt-file.

So this is solved for now at least.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.