Tag Archives: freebsd

ការបញ្ចូល git ក្នុង Raspberry Pi ដើរ​ FreeBSD 11

ដោយ​សារ​ពុំមាន​ កញ្ចប់បាយនារី (binary package) នៃ​​ git យើង​​ត្រូវ​បញ្ចូល​ git​ពីសោះ​ខូត ដូច​ខាងក្រោម៖

# cd /usr/ports/devel/git
# make install clean

សង្ឃឹម​ថា​ថ្ងៃ​ក្រោយ​ឆាប់ៗ កញ្ចប់​បាយនារី នឹង​បាន​បង្កើត​ឡើង​ ព្រោះខំផាយ​ពី សោះខូត​យើត​ណាស់ ជាពិសេស​ពេល​ខំផាយ​វា​លើ​ រ៉ាស់​ប៊ែរី​ផាយ។

FreeBSD 10: Shared object “libstdc++.so.6” not found

Today while I was updating py27-m2crypto package on FreeBSD 10 using portmaster, the following error message was displayed:

Shared object "libstdc++.so.6" not found, required by "swig"

Fortunately, someone else has found the problem and solution before me. According this blog post, “FreeBSD 10 includes a new C++ stack and gcc, including libstdc++, is not installed by default”.

Therefore to fix the missing libstdc++.so.6 issue is to install lang/gcc.

If you use portmaster, the command is install lang/gcc is:

portmaster lang/gcc

Credit: http://www.laszlopusztai.net/2014/01/26/running-perforce-on-freebsd-10/

Upgrade existing Perl 5.12 to Perl 5.18 on FreeBSD 9

Recently I’ve been trying to update the perl package on my FreeBSD box to the latest version 5.18 without any success. Here’s a snippet of the error message:

Creating various symlinks in /usr/bin...
    Symlinking /usr/local/bin/perl5.18.1 to /usr/bin/perl
    Symlinking /usr/local/bin/perl5.18.1 to /usr/bin/perl5
Done.
Installing perl5.18-5.18.1_2...pkg-static: perl5.18-5.18.1_2 conflicts with perl-5.12.5 (installs files into the same place).  Problematic file: /usr/local/bin/a2p
*** [fake-pkg] Error code 70
Stop in /usr/ports/lang/perl5.18.
*** [install] Error code 1

Stop in /usr/ports/lang/perl5.18.

===>>> Installation of perl5.18-5.18.1_2 (lang/perl5.18) failed
===>>> Aborting update

===>>> Killing background jobs
Terminated

===>>> You can restart from the point of failure with this command line:
portmaster lang/perl5.18

===>>> Exiting

So I turned to Google to see if other people experienced the same thing as me. According to an answer to a similar question about upgrading perl on serverfault.com, one should read

/usr/ports/UPDATING

document frequently.

Let’s do it.

pkg updating | less
20131023:
  AFFECTS: users of lang/perl5.12 lang/perl5.14
  AUTHOR: mat@FreeBSD.org

  The default perl has been switched to lang/perl5.16. If you're using binary
  packages, you need to do :

  # pkg set -o lang/perl5.14:lang/perl5.16

  If you're not using binary packages and want to (and should) switch, if
  you're using perl-5.14, for instance :

  Portupgrade users:
    0) Fix pkgdb.db (for safety):
        pkgdb -Ff

    1) Reinstall new version of Perl (5.16):
        portupgrade -o lang/perl5.16 -f perl-5.14.\*

    2) Reinstall everything that depends on Perl:
        portupgrade -fr perl

  Portmaster users:
        portmaster -o lang/perl5.16 lang/perl5.14

        Conservative:
        portmaster p5-

        Comprehensive (but perhaps overkill):
        portmaster -r perl-

  Note: If the "perl-" glob matches more than one port you will need to specify
        the name of the Perl directory in /var/db/pkg explicitly.

I’m using Portmaster, and I’d like to upgrade from perl5.12 to perl5.18.

# portmaster -o lang/perl5.18 lang/perl5.12

…and after a very long wait, this was the result:

===>>> Updating dependency entry for perl5.18-5.18.1_2 in each dependent port

===>>> Delete perl/perl-5.16.3.tar.bz2? y/n [n] y

===>>> Delete old and new distfiles for lang/perl5.12
       without prompting? y/n [n] y

===>>> Installation of lang/perl5.18 (perl5.18-5.18.1_2) complete

===>>> Exiting

There you go. If there’s only thing you can take from this post is that if you upgrade packages from sources very often on FreeBSD, you really should check the /usr/ports/UPDATING.

Portsnap snapshot corrupt

ថ្ងៃ​នេះខ្ញុំ​​មាន​បញ្ហា​ជាមួយ​ portsnap លើ​ FreeBSD ស៊ើវើ។ ពេល​ខ្ញុំ​រត់​ខំម៉ាន​ portsnap fetch upate មាន​ពត៌មាន​ដូច​នេះ

/usr/ports/files/.gz not found — snapshot corrupt.

តាម​ប្លក់នេះ របៀប​ជួសជុល​វា មិន​ពិបាកទេ។

rm -rf /var/db/portsnap/*
portsnap fetch
portsnap extract

Source: http://neonpulse.net/2008/11/20/portsnap-corrupt-snapshot/

FreeBSD: Fatal error: Call to undefined function session_name()

I just setup Apache and PHP on FreeBSD 9, configured a vhost, then when I tried to access it, I got the following error:

Fatal error: Call to undefined function session_name() in /srv/www/sugaku.domain.com/inc/init.php on line 144

so apparently, the “session” support is missiong from php5 installation. To fix it, I need to install php5-session port.

Let’s do it.

# whereis php5-session
php5-session: /usr/ports/www/php5-session
portmaster www/php5-session

If the installation is successful, then we can restart apache.

# service apache22 restart

or

# /usr/local/etc/rc.d/apache22 restart

That’s it.

Credit: http://forums.freebsd.org/showthread.php?t=12565

Installing FreeBSD 9 source

Well, I need FreebSD 9 source to compile fusefs-kmod, which is required by gvfs, which’s in turn required by xfce.

A lot of people recommend to use sysinstall to add the so called userland sources.

sysinstall -> Configure -> Distribution -> src

However, it didn’t work!!

Thanks to wblock@[1] who pointed out that “sysinstall is mostly dead” and suggested a few ways to get the sources to your system. One of them is:

Download the tar file that matches the version you installed. In my case it’s amd64:
# wget ftp://ftp.freebsd.org/pub/FreeBSD/releases/amd64/9.0-RELEASE/src.txz

Unpack the archive to /usr/src:
# tar -C / -xvzf src.txz

[1] http://forums.freebsd.org/showthread.php?t=29172