# problem with reinstalling ports



## bagas (Nov 18, 2017)

Hello.
Ports updated.
Please tell me how to fix this situation.
I do not want to recurse all the ports recursively.
After updating the ports.

```
portupgrade -arR
```


```
Nov 18 11:49:27 1a pkg-static: portmaster-3.17.10 installed
Nov 18 11:53:20 1a pkg: pkg-1.10.1 deinstalled
Nov 18 11:53:20 1a pkg-static: pkg-1.10.2 installed
Nov 18 14:01:03 1a pkg: py27-certifi-2017.7.27.1 deinstalled
Nov 18 14:01:04 1a pkg-static: py27-certifi-2017.11.5 installed
Nov 18 14:01:11 1a pkg: ca_root_nss-3.32.1 deinstalled
Nov 18 14:01:13 1a pkg-static: ca_root_nss-3.34 installed
Nov 18 14:01:28 1a pkg: oniguruma5-5.9.6_1 deinstalled
Nov 18 14:01:29 1a pkg-static: oniguruma6-6.6.1 installed
Nov 18 14:02:28 1a pkg: glib-2.50.2_6,1 deinstalled
Nov 18 14:02:30 1a pkg-static: glib-2.50.2_7,1 installed
Nov 18 14:02:51 1a pkg: libuv-1.16.0 deinstalled
Nov 18 14:02:52 1a pkg-static: libuv-1.16.1 installed
Nov 18 14:07:46 1a pkg: cmake-3.9.4 deinstalled
Nov 18 14:07:49 1a pkg-static: cmake-3.9.6 installed
```


```
root@1a:/usr/ports/www/nginx # make reinstall clean
===>  Installing for nginx-1.12.2_1,2
===>   nginx-1.12.2_1,2 depends on shared library: libpcre.so - found (/usr/local/lib/libpcre.so)
===>   Registering installation for nginx-1.12.2_1,2
pkg-static: Warning: @exec is deprecated, please use @[pre|post][un]exec
*** Error code 70

Stop.
make[2]: stopped in /usr/ports/www/nginx
*** Error code 1

Stop.
make[1]: stopped in /usr/ports/www/nginx
*** Error code 1

Stop.
make: stopped in /usr/ports/www/nginx
root@1a:/usr/ports/www/nginx #
```


```
root@1a:/usr/ports/editors/nano # make reinstall clean
===>  Installing for nano-2.8.7
===>   nano-2.8.7 depends on executable: indexinfo - found
===>   nano-2.8.7 depends on shared library: libintl.so - found (/usr/local/lib/libintl.so)
===>   Registering installation for nano-2.8.7
*** Error code 70

Stop.
make[2]: stopped in /usr/ports/editors/nano
*** Error code 1

Stop.
make[1]: stopped in /usr/ports/editors/nano
*** Error code 1

Stop.
make: stopped in /usr/ports/editors/nano
root@1a:/usr/ports/editors/nano #
```
On every port, errors.

```
root@1a:/usr/ports/www/nginx # pkg version | grep "<"
root@1a:/usr/ports/www/nginx #
```


----------



## SirDice (Nov 20, 2017)

What version of FreeBSD?


----------



## bagas (Nov 20, 2017)

SirDice said:


> What version of FreeBSD?




```
# pkg -v
1.10.2
# pkg check -Bda
Checking all packages: 100%
#
```


```
# uname -rm
11.0-RELEASE-p15 amd64
```
New software is installed.
I noticed that when you reinstall ( make reinstall clean ) already installed software on any port, there is an *** Error code 70 .


----------



## bagas (Nov 21, 2017)

Not solved.


----------



## PacketMan (Nov 22, 2017)

You could consider running ports-mgmt/synth to help with managing your updates. Its a great tool, and helps get your machine up an running, although using portmaster and learning from issues like this can be a better way to learn.


----------



## tobik@ (Nov 22, 2017)

bagas said:


> make reinstall clean


Use `make deinstall install clean` instead: Thread 62808/#post-362769.


----------



## ShelLuser (Nov 22, 2017)

Actually, isn't `# make deinstall reinstall clean` the suggested command?

I suppose both targets (install and reinstall) basically do the same thing but reinstall is explicitely mentioned in ports(7) as being somewhat of the deinstall counterpart.


----------



## tobik@ (Nov 22, 2017)

The reason that reinstall exists is to rerun a previous `make install` i.e. the port is in a state where it was previously installed but you haven't yet cleaned the work directory.


----------



## bagas (Nov 22, 2017)

Do not understand.
Do I remove all installed software and reinstall it?


----------



## ShelLuser (Nov 22, 2017)

bagas said:


> Do not understand.
> Do I remove all installed software and reinstall it?


When you try to install www/nginx was that port already installed or did you attempt a reinstall? That part isn't fully clear to me.

If you're merely installing a new port you'd normally use: `# make install clean` in the ports own directory. If you're trying to reinstall a port use the suggestion tobik@ mentioned above, so: `# make deinstall install clean`.


----------



## bagas (Nov 22, 2017)

ShelLuser said:


> When you try to install www/nginx was that port already installed or did you attempt a reinstall? That part isn't fully clear to me.
> 
> If you're merely installing a new port you'd normally use: `# make install clean` in the ports own directory. If you're trying to reinstall a port use the suggestion tobik@ mentioned above, so: `# make deinstall install clean`.


I try to reinstall.
And so on each port, it's expensive to get all the ports to be removed, and afterwards to install the ports again.
Because of what this could happen?


----------



## poorandunlucky (Nov 23, 2017)

You could try

```
zfs snapshot -r freebsd@`date +"%Y%m%d%H%M%S"`
pkg list >> ~/portlist.plist
pkg remove -a
poudriere bulk -j packages -p freebsd -f ~/portlist.plist
```
It should take maybe a week or so, and then you can re-install your stuff after editing /usr/local/etc/pkg/repos.


----------

