3 Replies to “HEADS UP: pkg will eat itself”

  1. bad, worse, worst:

    1)

    #pkg ins php5-fileinfo
    All repositories are up-to-date.
    New version of pkg detected; it needs to be installed first.
    The following 1 packages will be affected (of 0 checked):

    Installed packages to be UPGRADED:
    pkg: 1.4.11 -> 1.4.12

    The operation will free 16 B.
    2 MiB to be downloaded.

    Proceed with this action? [y/N]: y
    Fetching pkg-1.4.12.txz: 100% 2 MiB 2.2MB/s 00:01
    Checking integrity… done (0 conflicting)
    [1/1] Upgrading pkg from 1.4.11 to 1.4.12…
    You may need to manually remove /usr/local/etc/pkg/repos/df-latest.conf if it’s no longer needed.
    [1/1] Extracting pkg-1.4.12: 20%
    pkg: archive_read_extract(): truncated input
    [1/1] Extracting pkg-1.4.12: 100%
    [1/1] Deleting files for pkg-1.4.12: 100%
    # pkg ins php5-fileinfo
    pkg: Command not found.

    2)

    # cd /usr && make pkg-bootstrap
    /tmp/pkgboot.tar.xz 100% of 1604 kB 140 kBps 00m11s
    /usr/local/sbin/pkg-static install -y pkg
    Updating Avalon repository catalogue…
    Fetching meta.txz: 100% 260 B 0.3k/s 00:01
    Fetching digests.txz: 100% 2 MB 173.4k/s 00:11
    Fetching packagesite.txz: 100% 4 MB 426.1k/s 00:11
    Processing new repository entries: 100%
    Avalon repository update completed. 21927 packages processed:
    0 updated, 0 removed and 21927 added.
    pkg-static: warning: database version 30 is newer than libpkg(3) version 27, but still compatible
    New version of pkg detected; it needs to be installed first.
    Checking integrity… done (0 conflicting)
    The following 1 packages will be affected (of 0 checked):

    Installed packages to be UPGRADED:
    pkg: 1.4.11 -> 1.4.12

    The operation will free 16 B.
    You may need to manually remove /usr/local/etc/pkg/repos/df-latest.conf if it’s no longer needed.
    pkg-static: unlink(/usr/local/share/licenses/pkg-1.4.11/BSD2CLAUSE): No such file or directory
    pkg-static: unlink(/usr/local/share/licenses/pkg-1.4.11/LICENSE): No such file or directory
    pkg-static: unlink(/usr/local/share/licenses/pkg-1.4.11/catalog.mk): No such file or directory
    [1/1] Upgrading pkg from 1.4.11 to 1.4.12: 100%
    Updating Avalon repository catalogue…
    Avalon repository is up-to-date.
    All repositories are up-to-date.
    Checking integrity… done (0 conflicting)
    The most recent version of packages are already installed

    3)

    pkg install php5-fileinfo
    pkg: Command not found.

    4)

    # rm /usr/local/etc/pkg/repos/df-latest.conf

    5)

    pkg install php5-fileinfo
    No active remote repositories configured.

    6)

    Question: Why, Why, Why?

  2. why did you do this? “rm /usr/local/etc/pkg/repos/df-latest.conf”

    run “cd /usr && make pkg-bootstrap” again to restore it.

  3. Nobody – you did the right thing when you ran the command to reinstall pkg. I don’t know why you deleted the config. As John points out, you can reinstall that the same way.

    The ‘pkg: command not found’ is I assume because you are using tcsh and didn’t type ‘rehash’ so that the shell would know the new file existed.

    So, to summarize: cd /usr; make pkg-bootstrap

    ‘rehash’ if necessary.

Comments are closed.