# install lib32 via shell



## Wolfi83 (Sep 9, 2011)

hi,

is it possible to install the lib32 (sysinstall, configure, distributions, lib32) via command line (putty) or via a shell?
i wonÂ´t add it via sysinstall, i need it in shell.


----------



## graudeejs (Sep 9, 2011)

Indeed it is.

fetch all files from 
ftp://ftp.freebsd.org/pub/FreeBSD/releases/amd64/8.2-RELEASE/lib32
then set DESTDIR environment variable (you probably want to set it to root [*/*])
and then run *./install.sh*

and that's it.

Read this for details:
http://www.daemonforums.org/showthread.php?t=1538


----------



## Wolfi83 (Sep 9, 2011)

Hi,

I want to set it like the sysinstall into /usr/lib32 so i must set the DESTDIR environment variable only to " / " or " /usr/lib32 "?
So i only have to fetch alle file from there, set the variable and run install.sh?


----------



## graudeejs (Sep 9, 2011)

You need to set it to root ("/"). It will install in *$DESTDIR/usr/lib32*
Yup, it's simple as that.


----------



## Wolfi83 (Sep 9, 2011)

Hi,

ok thx so i have only to fetch these files and run install.sh ok perfect!!
but thats all? i dont have to do any changes in the kernel?


----------



## graudeejs (Sep 9, 2011)

Wolfi83 said:
			
		

> Hi,
> 
> ok thx so i have only to fetch these files and run install.sh ok perfect!!
> but thats all? i dont have to do any changes in the kernel?



lol. no, unless you use custom kernel.
Make sure you have

```
options 	COMPAT_FREEBSD32	# Compatible with i386 binaries
```
in your kernel.

If you use GENERIC kernel, it's all good


----------



## Wolfi83 (Sep 9, 2011)

I use the unmodified generic kernel but i canÂ´t find this options COMPAT_FREEBSD32 there, so i have to add or all is ok without this option in generic kernel?


----------



## graudeejs (Sep 9, 2011)

Are you sure you use amd64?
`$ uname -m`

*COMPAT_FREEBSD32* is in GENERIC (on amd64), I double checked


----------



## Wolfi83 (Sep 9, 2011)

graudeejs said:
			
		

> Are you use you use amd64?
> `$ uname -m`
> 
> *COMPAT_FREEBSD32* is in GENERIC (on amd64), I double checked



Hehe, sure!


```
host# uname -m
amd64
```


```
host# uname -a
FreeBSD host.********* 8.2-RELEASE FreeBSD 8.2-RELEASE #0: Thu Feb 17 02:41:51 UTC 2011     
root@mason.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC  amd64
```

I checked in /usr/src/sys/i386/conf/GENERIC and dont found the command, so wheres the error??


----------



## graudeejs (Sep 9, 2011)

The error is, that you checked /usr/src/sys/[red]i386[/red]/conf/GENERIC instead of /usr/src/sys/[red]amd64[/red]/conf/GENERIC


----------



## Wolfi83 (Sep 9, 2011)

Oh man i was so familiar with i386 and changed to amd64 ... -.- sorry my mistake lol
so that was all i'll test it later, if i get erros ill post so just thank you dude!! =)


----------



## graudeejs (Sep 9, 2011)

You're welcome


----------



## Wolfi83 (Sep 9, 2011)

hi,

i got a problem while fetching:


```
host# fetch ftp://ftp.freebsd.org/pub/FreeBSD/releases/amd64/8.2-RELEASE/lib32/*
fetch: No match.
host# fetch ftp://ftp.freebsd.org/pub/FreeBSD/releases/amd64/8.2-RELEASE/lib32/
fetch: ftp://ftp.freebsd.org/pub/FreeBSD/releases/amd64/8.2-RELEASE/lib32/: File unavailable (e.g., file not found, no access)
```

I try to ping ftp.freebsd.org and it worked, whats the problem?


----------



## graudeejs (Sep 9, 2011)

It doesn't work that way, perhaps wget can do that, but you can

```
# echo CHECKSUM.SHA256 CHECKSUM.MD5 install.sh lib32.a{a,b,c,d,e,f,g,h,i,j,k,l,m} lib32.inf lib32.mtree | xargs -n 1 -I%s fetch ftp://ftp.freebsd.org/pub/FreeBSD/releases/amd64/8.2-RELEASE/lib32/%s
```


----------

