0

On Ubuntu Xenial server, installing zfsnap exists with error status 0. However, the package isn't properly installed:

$ zfsnap
zfsnap: command not found
$
$ sudo dpkg -p zfsnap
dpkg-query: package 'zfsnap' is not available
Use dpkg --info (= dpkg-deb --info) to examine archive files,
and dpkg --contents (= dpkg-deb --contents) to list their contents.
$
$ sudo dpkg -s zfsnap
Package: zfsnap
Status: install ok installed
Priority: extra
Section: admin
Installed-Size: 80
Maintainer: Ubuntu Developers <[email protected]>
Architecture: all
Version: 1.11.1-3
Depends: zfs-fuse | zfsutils | zfs, bc

Is there anything here (or something else I should look at) that suggests why the package isn't working properly?


Below is apt's output for the installation:

$ sudo apt install zfsnap
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following additional packages will be installed:
  bc
The following NEW packages will be installed:
  bc zfsnap
0 upgraded, 2 newly installed, 0 to remove and 20 not upgraded.
Need to get 97.9 kB of archives.
After this operation, 328 kB of additional disk space will be used.
Do you want to continue? [Y/n] 
Get:1 http://il.archive.ubuntu.com/ubuntu xenial/main amd64 bc amd64 1.06.95-9build1 [82.6 kB]
Get:2 http://il.archive.ubuntu.com/ubuntu xenial/universe amd64 zfsnap all 1.11.1-3 [15.4 kB]
Fetched 97.9 kB in 1s (69.7 kB/s)
Selecting previously unselected package bc.
(Reading database ... 175968 files and directories currently installed.)
Preparing to unpack .../bc_1.06.95-9build1_amd64.deb ...
Unpacking bc (1.06.95-9build1) ...
Selecting previously unselected package zfsnap.
Preparing to unpack .../zfsnap_1.11.1-3_all.deb ...
Unpacking zfsnap (1.11.1-3) ...
Processing triggers for man-db (2.7.5-1) ...
Processing triggers for install-info (6.1.0.dfsg.1-5) ...
Setting up bc (1.06.95-9build1) ...
Setting up zfsnap (1.11.1-3) ...
$ echo $?
0

2 Answers 2

1

You can view a list of files included in a package with

dpkg-query -L zfsnap

To see the usable commands you could grep for /usr/bin or /usr/sbin in this case:

dpkg-query -L zfsnap|grep /usr/sbin

EDIT: Catch-all with fancy regexp ;)

dpkg-query -L zfsnap|egrep "(/usr)*/(s*)bin"
2
  • I could not add a comment to the other answer due to lack of reputation, sorry ;)
    – jr98
    Jul 21, 2016 at 9:53
  • I'd just grep bin, but dpkg -L is precisely what I needed. Jul 21, 2016 at 13:04
1
»» $ zfsnap
zfsnap: command not found ««

The package zfsnap provides /usr/sbin/zfSnap : Please note the upper case S in zfSnap.

Spelling, 1) Read the file list with dpkg -L zfsnap 2) Read online http://packages.ubuntu.com/xenial/all/zfsnap/filelist

4
  • Terrific! Just for future reference, however, how should one deduce that? dpkg -S zfsnap only finds the documentation (but, that is how the documentation entries are spelled); where's the clue that the executable of the zfsnap package is spelled zfSnap? Jul 21, 2016 at 9:24
  • Please read my edited answer. Jul 24, 2016 at 14:52
  • Thanks; if I hadn't up-voted already, I would now (@jr98 also mentioned the -L flag, so I don't want to un-accept his/her answer) Jul 24, 2016 at 14:58
  • thank god newer versions don't have the capital S anymore. Feb 1, 2020 at 0:29

You must log in to answer this question.

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