# PKG installation on Freebsd 13



## miked123 (Aug 14, 2021)

Hi,

I am working on my first AWS Gavitron (ARM based) instance using FreeBSD 13. I have terminated 3 different machines, and every time, I attempt to install python38 I get different results:

```
root@freebsd:~ # uname -a
FreeBSD freebsd 13.0-RELEASE FreeBSD 13.0-RELEASE #0 releng/13.0-n244733-ea31abc261f: Fri Apr  9 03:54:53 UTC 2021     [email]root@releng1.nyi.freebsd.org[/email]:/usr/obj/usr/src/arm64.aarch64/sys/GENERIC  arm64
```
- The package appears to be present

```
root@freebsd:~ # pkg search python38
python38-3.8.10                Interpreted object-oriented programming language
unit-python38-1.24.0           Python module for NGINX Unit
```

- Attempt to install python38

```
root@freebsd:~ # pkg install python38-3.8.10  
Updating FreeBSD repository catalogue...
FreeBSD repository is up to date.
All repositories are up to date.
Checking integrity... done (0 conflicting)
The most recent versions of packages are already installed
```


```
root@freebsd:/usr/ports/ports-mgmt/pkg # pkg install python38-3.8.10
Updating FreeBSD repository catalogue...
pkg: http://pkgmir.geo.freebsd.org/FreeBSD:13:aarch64/quarterly/packagesite.pkg: Not Found
FreeBSD repository is up to date.
All repositories are up to date.
Updating database digests format: 100%
Checking integrity... done (0 conflicting)
The most recent versions of packages are already installed
```


- Since, it appears that the python version was installed

```
root@freebsd:~ # which python
python: Command not found.
```
I have also attempted to install it via portsnap by doing:


```
portsnap fetch
portsnap auto
```

downloads something, when I do the `portsnap auto`, 

`cd /usr/ports/lang/python38/ && make && make install`

```
root@freebsd:/usr/ports/ports-mgmt/pkg #  cd /usr/ports/lang/python38/ && make && make install
===>  python38-3.8.11 is marked as broken: incorrect pkg-plist.
*** Error code 1

Stop.
make: stopped in /usr/ports/lang/python38
```
Can someone help shed some light in what could be happening?


----------



## SirDice (Aug 14, 2021)

miked123 said:


> Since, it appears that the python version was installed
> 
> ```
> root@freebsd:~ # which python
> ...


It's `python3.8`.


----------



## miked123 (Aug 14, 2021)

I was able to compile python via ports using the following:


```
cd /usr/ports/lang/python38/
make config fetch checksum depends extract patch configure build

*** make sure to only enable FNV option***

make deinstall
make reinstall

 ln -s /usr/local/bin/python3.8 /usr/local/bin/python
```
The instructions above did it.


----------



## SirDice (Aug 14, 2021)

You're not supposed to be using `/usr/local/bin/python` anymore. Your shebang line should be:

```
#!/bin/env python3.8
```


----------



## miked123 (Aug 15, 2021)

I am switching back from Ubuntu, and from the intel world, thanks for the insight!!!


----------

