Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    Trying to install wget from FreeBSD repo ruined my pkg utility(my mistake). Is there a fix for this ?

    Scheduled Pinned Locked Moved General pfSense Questions
    11 Posts 4 Posters 1.4k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • P
      PF4PFS
      last edited by PF4PFS

      The screen log is below.
      I there a fix for this other than reinstalling everything ?

      [2.7.0-RELEASE][admin@pfSense.mylab.net]/root: pkg install wget
      Updating FreeBSD repository catalogue...
      Fetching meta.conf: 100%    163 B   0.2kB/s    00:01    
      Fetching packagesite.pkg: 100%    7 MiB   6.9MB/s    00:01    
      Processing entries:   0%
      Newer FreeBSD version for package zziplib:
      To ignore this error set IGNORE_OSVERSION=yes
      - package: 1400097
      - running kernel: 1400085
      Ignore the mismatch and continue? [y/N]: y
      Processing entries: 100%
      FreeBSD repository update completed. 34000 packages processed.
      Updating pfSense-core repository catalogue...
      pfSense-core repository is up to date.
      Updating pfSense repository catalogue...
      pfSense repository is up to date.
      All repositories are up to date.
      New version of pkg detected; it needs to be installed first.
      The following 1 package(s) will be affected (of 0 checked):
      
      Installed packages to be UPGRADED:
              pkg: 1.19.1_2 -> 1.20.7 [FreeBSD]
      
      Number of packages to be upgraded: 1
      
      The process will require 7 MiB more space.
      11 MiB to be downloaded.
      
      Proceed with this action? [y/N]: y
      [1/1] Fetching pkg-1.20.7.pkg: 100%   11 MiB  11.2MB/s    00:01    
      Checking integrity... done (0 conflicting)
      [1/1] Upgrading pkg from 1.19.1_2 to 1.20.7...
      [1/1] Extracting pkg-1.20.7: 100%
      You may need to manually remove /usr/local/etc/pkg.conf if it is no longer needed.
      ld-elf.so.1: Shared object "libssl.so.30" not found, required by "pkg"
      [2.7.0-RELEASE][admin@pfSense.mylab.net]/root: wget
      wget: Command not found.
      [2.7.0-RELEASE][admin@pfSense.mylab.net]/root: pkg install wget
      ld-elf.so.1: Shared object "libssl.so.30" not found, required by "pkg"
      
      1 Reply Last reply Reply Quote 0
      • stephenw10S
        stephenw10 Netgate Administrator
        last edited by

        Remove the FreeBSD repo. Then:
        pkg-static install -f pkg

        It should offer to downgrade to the pfSense 2.7.0 pkg version.

        Steve

        P 1 Reply Last reply Reply Quote 0
        • P
          PF4PFS @stephenw10
          last edited by

          @stephenw10 Thank for the reply

          Here is the log

          2.7.0-RELEASE][admin@pfSense.mylab.net]/root: pkg-static install -f pkg
          Updating pfSense-core repository catalogue...
          pkg-static: An error occured while fetching package
          pkg-static: An error occured while fetching package
          repository pfSense-core has no meta file, using default settings
          pkg-static: An error occured while fetching package
          pkg-static: An error occured while fetching package
          Unable to update repository pfSense-core
          Updating pfSense repository catalogue...
          pkg-static: An error occured while fetching package
          pkg-static: An error occured while fetching package
          repository pfSense has no meta file, using default settings
          pkg-static: An error occured while fetching package
          pkg-static: An error occured while fetching package
          Unable to update repository pfSense
          Error updating repositories!
          
          
          
          2.7.0-RELEASE][admin@pfSense.mylab.net]/root: pkg-static remove pkg
          Checking integrity... done (0 conflicting)
          Deinstallation has been requested for the following 1 packages (of 0 packages in the universe):
          
          Installed packages to be REMOVED:
                  pkg: 1.20.7
          
          Number of packages to be removed: 1
          
          The operation will free 40 MiB.
          
          Proceed with deinstalling packages? [y/N]: y
          pkg-static: Cannot delete pkg itself without force flag
          [2.7.0-RELEASE][admin@pfSense.mylab.net]/root: pkg-static remove -f pkg
          Checking integrity... done (0 conflicting)
          Deinstallation has been requested for the following 1 packages (of 0 packages in the universe):
          
          Installed packages to be REMOVED:
                  pkg: 1.20.7
          
          Number of packages to be removed: 1
          
          The operation will free 40 MiB.
          
          Proceed with deinstalling packages? [y/N]: y
          [1/1] Deinstalling pkg-1.20.7...
          [1/1] Deleting files for pkg-1.20.7: 100%
          You may need to manually remove /usr/local/etc/pkg.conf if it is no longer needed.
          [2.7.0-RELEASE][admin@pfSense.mylab.net]/root: pkg-static install -f pkg
          pkg-static: Command not found.
          

          It seems that removing pkg also removed the pkg-static command

          1 Reply Last reply Reply Quote 0
          • P
            PF4PFS
            last edited by

            grrr by mistake I removed the package not the repo
            What can I do now ?

            GertjanG 1 Reply Last reply Reply Quote 0
            • stephenw10S
              stephenw10 Netgate Administrator
              last edited by

              Check /var/cache/pkg. You may have one or both those packages still there and can install from the file directly using pkg add. Though if you have actually removed the pkg binary that's... a problem!
              It's probably easier to backup the config and reinstall 2.7 clean.

              P 1 Reply Last reply Reply Quote 2
              • P
                PF4PFS @stephenw10
                last edited by

                @stephenw10 thanks a lot, that worked, both versions of pkg were there

                [2.7.0-RELEASE][admin@pfSense.mylab.net]/root: pkg add  /var/cache/pkg/pkg-1.19.1_2.pkg
                Installing pkg-1.19.1_2...
                Extracting pkg-1.19.1_2: 100%
                [2.7.0-RELEASE][admin@pfSense.mylab.net]/root: pkg
                pkg: not enough arguments
                Usage: pkg [-v] [-d] [-l] [-N] [-j <jail name or id>|-c <chroot path>|-r <rootdir>] [-C <configuration file>] [-R <repo config dir>] [-o var=value] [-4|-6] <command> [<args>]
                
                For more information on available commands and options see 'pkg help'.
                

                I hope pfsense is now back to its original files

                bmeeksB 1 Reply Last reply Reply Quote 1
                • GertjanG
                  Gertjan @PF4PFS
                  last edited by

                  @PF4PFS

                  Quick & safe : get a copy of your config.

                  Re install.

                  No "help me" PM's please. Use the forum, the community will thank you.
                  Edit : and where are the logs ??

                  1 Reply Last reply Reply Quote 1
                  • bmeeksB
                    bmeeks @PF4PFS
                    last edited by bmeeks

                    @PF4PFS said in Trying to install wget from FreeBSD repo ruined my pkg utility(my mistake). Is there a fix for this ?:

                    I hope pfsense is now back to its original files

                    Lesson to be learned and shared with others -- do not add packages from non-Netgate repos ๐Ÿ™‚. This includes even the official FreeBSD repos. Doing so has a very high likelihood of breaking your pfSense installation due to changes in versions of particular binaries or shared libraries.

                    1 Reply Last reply Reply Quote 0
                    • stephenw10S
                      stephenw10 Netgate Administrator
                      last edited by

                      Yup if you enable the repo it will pull in any dependencies from there.

                      If you must do it I would download the pkgs from the FreeBSD repo and 'pkg add' them directly. If that results loads of additional dependencies being required it might be time to rethink! ๐Ÿ˜‰

                      P 1 Reply Last reply Reply Quote 1
                      • P
                        PF4PFS @stephenw10
                        last edited by

                        @stephenw10

                        I did read around here about people having problems after doing it but I thought wget with be rather simple :-) ..it was not :-)

                        1 Reply Last reply Reply Quote 0
                        • stephenw10S
                          stephenw10 Netgate Administrator
                          last edited by

                          When you run pkg it tries to update itself and right now the FreeBSD 14 repo has a significantly newer version. 1.2X has a few changes from 1.9X that you're hitting. But you should always be able to use pkg-static.

                          1 Reply Last reply Reply Quote 0
                          • First post
                            Last post
                          Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.