Sponsored Content
Operating Systems BSD Using pkg_add on alternative host Post 302303818 by RealFreeBSDTips on Friday 3rd of April 2009 02:07:17 PM
Old 04-03-2009
# export PACKAGEROOT=ftp://ftp3.FreeBSD.org
# pkg_add -v -r vim
 

10 More Discussions You Might Find Interesting

1. IP Networking

QNX host cannot ping SCO host, vice versa

The problem I am facing now is that the QNX host could not ping the SCO host and vice versa. They are in the same domain, ie, 172.20.3.xx. As I am very new to Unix, I guess I must have missed out some important steps. Pls help... Thanx alot (2 Replies)
Discussion started by: gavon
2 Replies

2. UNIX for Advanced & Expert Users

host alias not working: host not found

Hello, I am working on HP-UX , and in the /etc/hosts file we have setup an alias: aa.bb.cc.dd devmach2.unix.org devmach2 devma2v The alias devma2v does not work. Error when pinging devma2v ping: unknown host devma2v For devmach2 the ping works fine , returning the correct IP... (4 Replies)
Discussion started by: FunnyCats
4 Replies

3. Solaris

How to delete the files from local host to remote host

Hi all, i am copying .gz files from production server to development server using "scp" command.my requirement is after copying .gz files i want to delete old .gz files(two days back) in development server from production server. like this way i need to delelte .log ,.z and .dmp files... (3 Replies)
Discussion started by: krishna176
3 Replies

4. UNIX for Dummies Questions & Answers

pkg_add fails

Hi, I have created a package on a 64 bit FreeBSD machine. when i install this (on another 64 bit FreeBSD machine )i get the following error : tar: Skipping pathname containing .. pkg_add: tar extract of /home/vcr/testpackage.tgz failed! pkg_add: unable to extract '/home/vcr/testpackage.tgz'!... (0 Replies)
Discussion started by: HIMANI
0 Replies

5. Shell Programming and Scripting

running commands to remote host from centralized host

Gurus/Experts We have a centralized UNIX/Solaris server from where we can actually ssh to all other UNIX/Solaris servers...I need to write a script that reside on this centerlized server and do FileSystem monitoring (basically run df -h or -k) of other remote servers and then send an email to me... (6 Replies)
Discussion started by: anjum.suri
6 Replies

6. UNIX for Advanced & Expert Users

Help! How to find the local host after few ssh hops to remote host???

I do a ssh to remote host(A1) from local host(L1). I then ssh to another remote(A2) from A1. When I do a who -m from A2, I see the "connected from" as "A1". => who -m userid pts/2 2010-03-27 08:47 (A1) I want to identify who is the local host who initiated the connection to... (3 Replies)
Discussion started by: gomes1333
3 Replies

7. UNIX for Dummies Questions & Answers

Transfer large number of files host to host

Hello.... I have two servers, one has an empty / and the other has a subdirectory with a large number (4 gig) with many, many files. I need a way to transfer the files en masse from the server with the large number of files to the one that is essentially blank. I don't have space on the used... (16 Replies)
Discussion started by: blaine.miller
16 Replies

8. IP Networking

ping can not recognize host but host command can

Hi, I have a weird problem. when ever I do ping command like for example ping unix.comI get the following message: # ping unix.com ping: unknown host unix.com but when I use host the computer is able to know the host. # host unix.com unix.com has address 81.17.242.186 unix.com mail is... (2 Replies)
Discussion started by: programAngel
2 Replies

9. Solaris

Need to recover/move diskgroup from failed host to another host

Hi All I am having VxVm on two Solaris hosts. host1 is using disk group dgHR. right now this server went down due to hardware fault. Not I need to import this dgHR into host2 server. Please let me know the procedure for the same. (1 Reply)
Discussion started by: amity
1 Replies

10. Shell Programming and Scripting

Connect to target host from Source host.

Hi All, Need to connect to target host and execute a command and connect back to source host to continue with next set of command execution. Is there a utility/command using which we can connect to target host ? Please suggest. Note: Netezza database is instaled on Linux server. ... (4 Replies)
Discussion started by: Nagaraja Akkiva
4 Replies
COMPAT_FREEBSD(8)					    BSD System Manager's Manual 					 COMPAT_FREEBSD(8)

NAME
compat_freebsd -- setup procedure for running FreeBSD binaries DESCRIPTION
NetBSD supports running FreeBSD binaries. Most binaries should work, except programs that use FreeBSD-specific features. These include i386-specific calls, such as syscons utilities. The FreeBSD compatibility feature is active for kernels compiled with the COMPAT_FREEBSD option enabled. A lot of programs are dynamically linked. This means, that you will also need the FreeBSD shared libraries that the program depends on, and the runtime linker. Also, you will need to create a ``shadow root'' directory for FreeBSD binaries on your NetBSD system. This directory is named /emul/freebsd. Any file operations done by FreeBSD programs run under NetBSD will look in this directory first. So, if a FreeBSD pro- gram opens, for example, /etc/passwd, NetBSD will first try to open /emul/freebsd/etc/passwd, and if that does not exist open the 'real' /etc/passwd file. It is recommended that you install FreeBSD packages that include configuration files, etc under /emul/freebsd, to avoid naming conflicts with possible NetBSD counterparts. Shared libraries should also be installed in the shadow tree. Generally, you will need to look for the shared libraries that FreeBSD binaries depend on only the first few times that you install a FreeBSD program on your NetBSD system. After a while, you will have a sufficient set of FreeBSD shared libraries on your system to be able to run newly imported FreeBSD binaries without any extra work. Setting up shared libraries How to get to know which shared libraries FreeBSD binaries need, and where to get them? Basically, there are 2 possibilities (when following these instructions: you will need to be root on your NetBSD system to do the necessary installation steps). 1. You have access to a FreeBSD system. In this case you can temporarily install the binary there, see what shared libraries it needs, and copy them to your NetBSD system. Example: you have just ftp-ed the FreeBSD binary of SimCity. Put it on the FreeBSD system you have access to, and check which shared libraries it needs by running 'ldd sim': me@freebsd% ldd /usr/local/lib/SimCity/res/sim /usr/local/lib/SimCity/res/sim: -lXext.6 => /usr/X11R6/lib/libXext.so.6.0 (0x100c1000) -lX11.6 => /usr/X11R6/lib/libX11.so.6.0 (0x100c9000) -lc.2 => /usr/lib/libc.so.2.1 (0x10144000) -lm.2 => /usr/lib/libm.so.2.0 (0x101a7000) -lgcc.261 => /usr/lib/libgcc.so.261.0 (0x101bf000) You would need go get all the files from the last column, and put them under /emul/freebsd. This means you eventually have these files on your NetBSD system: /emul/freebsd/usr/X11R6/lib/libXext.so.6.0 /emul/freebsd/usr/X11R6/lib/libX11.so.6.0 /emul/freebsd/usr/lib/libc.so.2.1 /emul/freebsd/usr/lib/libm.so.2.0 /emul/freebsd/usr/lib/libgcc.so.261.0 Note that if you already have a FreeBSD shared library with a matching major revision number to the first column of the ldd output, you won't need to copy the file named in the last column to your system, the one you already have should work. It is advisable to copy the shared library anyway if it is a newer version, though. You can remove the old one. So, if you have these libraries on your system: /emul/freebsd/usr/lib/libc.so.2.0 and you find that the ldd output for a new binary you want to install is: -lc.2 => /usr/lib/libc.so.2.1 (0x10144000) You won't need to worry about copying /usr/lib/libc.so.2.1 too, because the program should work fine with the slightly older version. You can decide to replace the libc.so anyway, and that should leave you with: /emul/freebsd/usr/lib/libc.so.2.1 Finally, you must make sure that you have the FreeBSD runtime linker and its config files on your system. You should copy these files from the FreeBSD system to their appropriate place on your NetBSD system (in the /emul/freebsd tree): usr/libexec/ld.so var/run/ld.so.hints 2. You don't have access to a FreeBSD system. In that case, you should get the extra files you need from various ftp sites. Information on where to look for the various files is appended below. For now, let's assume you know where to get the files. Retrieve the following files (from _one_ ftp site to avoid any version mismatches), and install them under /emul/freebsd (i.e. foo/bar is installed as /emul/freebsd/foo/bar): sbin/ldconfig usr/bin/ldd usr/lib/libc.so.x.y.z usr/libexec/ld.so ldconfig and ldd don't necessarily need to be under /emul/freebsd, you can install them elsewhere in the system too. Just make sure they don't conflict with their NetBSD counterparts. A good idea would be to install them in /usr/local/bin as ldconfig-freebsd and ldd-freebsd. Run the FreeBSD ldconfig program with directory arguments in which the FreeBSD runtime linker should look for shared libs. /usr/lib are standard, you could run like the following: me@netbsd% mkdir -p /emul/freebsd/var/run me@netbsd% touch /emul/freebsd/var/run/ld.so.hints me@netbsd% ldconfig-freebsd /usr/X11R6/lib /usr/local/lib Note that argument directories of ldconfig are mapped to /emul/freebsd/XXXX by NetBSD's compat code, and should exist as such on your system. Make sure /emul/freebsd/var/run/ld.so.hints is existing when you run FreeBSD's ldconfig, if not, you may lose NetBSD's /var/run/ld.so.hints. FreeBSD ldconfig should be statically linked, so it doesn't need any shared libraries by itself. It will create the file /emul/freebsd/var/run/ld.so.hints. You should rerun the FreeBSD version of the ldconfig program each time you add a new shared library. You should now be set up for FreeBSD binaries which only need a shared libc. You can test this by running the FreeBSD ldd on itself. Suppose that you have it installed as ldd-freebsd, it should produce something like: me@netbsd% ldd-freebsd `which ldd-freebsd` /usr/local/bin/ldd-freebsd: -lc.2 => /usr/lib/libc.so.2.1 (0x1001a000) This being done, you are ready to install new FreeBSD binaries. Whenever you install a new FreeBSD program, you should check if it needs shared libraries, and if so, whether you have them installed in the /emul/freebsd tree. To do this, you run the FreeBSD version ldd on the new program, and watch its output. ldd (see also the manual page for ldd(1)) will print a list of shared libraries that the program depends on, in the form -l<majorname> => <fullname>. If it prints ``not found'' instead of <fullname> it means that you need an extra library. Which library this is, is shown in <major- name>, which will be of the form XXXX.<N> You will need to find a libXXXX.so.<N>.<mm> on a FreeBSD ftp site, and install it on your sys- tem. The XXXX (name) and <N> (major revision number) should match; the minor number(s) <mm> are less important, though it is advised to take the most recent version. 3. In some cases, FreeBSD binary needs access to certain device file. For example, FreeBSD X server software needs FreeBSD /dev/ttyv0 for ioctls. In this case, create a symbolic link from /emul/freebsd/dev/ttyv0 to a wscons(4) device file like /dev/ttyE0. You will need to have at least options WSDISPLAY_COMPAT_SYSCONS and probably also options WSDISPLAY_COMPAT_USL in your kernel (see options(4) and wscons(4)). Finding the necessary files Note: the information below is valid as of the time this document was written (June, 1995), but certain details such as names of ftp sites, directories and distribution names may have changed by the time you read this. The FreeBSD distribution is available on a lot of ftp sites. Sometimes the files are unpacked, and you can get the individual files you need, but mostly they are stored in distribution sets, usually consisting of subdirectories with gzipped tar files in them. The primary ftp sites for the distributions are: ftp.freebsd.org:/pub/FreeBSD Mirror sites are described on: ftp.freebsd.org:/pub/FreeBSD/MIRROR.SITES This distribution consists of a number of tar-ed and gzipped files, Normally, they're controlled by an install program, but you can retrieve files ``by hand'' too. The way to look something up is to retrieve all the files in the distribution, and ``tar ztvf'' through them for the file you need. Here is an example of a list of files that you might need. Needed Files ld.so 2.0-RELEASE/bindist/bindist.?? ldconfig 2.0-RELEASE/bindist/bindist.?? ldd 2.0-RELEASE/bindist/bindist.?? libc.so.2 2.0-RELEASE/bindist/bindist.?? libX11.so.6.0 2.0-RELEASE/XFree86-3.1/XFree86-3.1-bin.tar.gz libX11.so.6.0 XFree86-3.1.1/X311bin.tgz libXt.so.6.0 2.0-RELEASE/XFree86-3.1/XFree86-3.1-bin.tar.gz libXt.so.6.0 XFree86-3.1.1/X311bin.tgz The files called ``bindist.??'' are tar-ed, gzipped and split, so you can extract contents by ``cat bindist.?? | tar zpxf -''. Extract the files from these gzipped tarfiles in your /emul/freebsd directory (possibly omitting or afterwards removing files you don't need), and you are done. BUGS
The information about FreeBSD distributions may become outdated. BSD
June 4, 1995 BSD
All times are GMT -4. The time now is 09:48 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy