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

    Pkg_add not working properly

    2.1 Snapshot Feedback and Problems - RETIRED
    3
    6
    2.6k
    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.
    • H
      helixxx
      last edited by

      hey. i've run into problems installing packages through pkg_add on my embedded board (alix w/ 256mb ram).
      in specific, there seems to be a lack of free space on /var
      i've solved this for now by simply disabling write protection, then creating a directory /1 on the root partition (enough space there) and then creating a symbolic link

      /etc/rc.conf_mount_rw
      mkdir /1
      ln -s /1 /var/tmp
      

      after the installations were done i simply removed /1 and the symbolic link i created.

      packages i needed to install were: wget, nano and syslog-ng - which also lead to the installation of perl and python among some others.
      python and perl by themselves gave me some sort of  "not enough space" msg.

      pkg_add -r python
      

      i realize my solution ain't pretty but it worked for the time being.
      if someone knows another workaround, please post here - i'd be interested.

      –---------------------

      uname -a
      FreeBSD demo.pfsense 8.3-RC2 FreeBSD 8.3-RC2 #0: Sat Apr  7 21:57:20 EDT 2012     root@FreeBSD_8.3_pfSense_2.1.snaps.pfsense.org:/usr/obj./usr/pfSensesrc/src/sys/pfSense_wrap.8.i386  i386
      
      
      1 Reply Last reply Reply Quote 0
      • stephenw10S
        stephenw10 Netgate Administrator
        last edited by

        Just FYI, you can use fetch and ee instead of wget and nano. They are already installed.

        Steve

        1 Reply Last reply Reply Quote 0
        • jimpJ
          jimp Rebel Alliance Developer Netgate
          last edited by

          When we add packages on NanoBSD for gitsync or the package system, we do a little dance to make sure it works properly and doesn't run /var out of space:

          Here is the snippet from gitsync to load git:

          
                  echo "Cannot find git, fetching...";
                  if (($g['platform'] == "nanobsd") || ($g['platform'] == "embedded")) {
                          $pkgtmpdir = "/usr/bin/env PKG_TMPDIR=/root/ ";
                          $pkgstagingdir = "/root/tmp";
                          if (!is_dir($pkgstagingdir))
                                  mkdir($pkgstagingdir);
                          $pkgstaging = "-t {$pkgstagingdir}/instmp.XXXXXX";
                  }
                  system("{$pkgtmpdir}/usr/sbin/pkg_add {$pkgstaging} -r git");
          
          

          By setting PKG_TMPDIR and passing a staging directory, it will process things in another place.

          Remember: Upvote with the 👍 button for any user/post you find to be helpful, informative, or deserving of recognition!

          Need help fast? Netgate Global Support!

          Do not Chat/PM for help!

          1 Reply Last reply Reply Quote 0
          • jimpJ
            jimp Rebel Alliance Developer Netgate
            last edited by

            @stephenw10:

            Just FYI, you can use fetch and ee instead of wget and nano. They are already installed.

            ^ that too.

            Remember: Upvote with the 👍 button for any user/post you find to be helpful, informative, or deserving of recognition!

            Need help fast? Netgate Global Support!

            Do not Chat/PM for help!

            1 Reply Last reply Reply Quote 0
            • H
              helixxx
              last edited by

              I'm just used to nano + wget … they're not that important anyway since i won't be needing them on a production system anyway.

              So setting that variable I still also need to make sure the directory I have it point to is not read-only, I guess. Thanks for the info though. I remember using pkg_add with no problems on prior versions of pfsense (1.2 I think).

              1 Reply Last reply Reply Quote 0
              • jimpJ
                jimp Rebel Alliance Developer Netgate
                last edited by

                Not on embedded you wouldn't have. On a full install it always works fine. :-)

                Remember: Upvote with the 👍 button for any user/post you find to be helpful, informative, or deserving of recognition!

                Need help fast? Netgate Global Support!

                Do not Chat/PM for help!

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