# Upgrade Sudo



## Cvezda (Feb 10, 2021)

Hi guys!
After news about CVE-2021-3156 I decided to upgrade my sudo from 1.8.20p2_2 to sudo 1.9.5p2. So i download new version sudo from sudo.ws. And install by:
./configure
make && sudo make install.
So after this steps sudo --version show 1.9.5p2, but pkg info show only old version sudo (1.8.20p2_2). I decide to uninstall old sudo: pkg delete sudo.
And after that step sudo is not working in the system. Error: shared object "libsudo_util.so.0" not found, required by "sudo". Sooo I reinstall new sudo:
./configure
make && sudo make install - but that doesn't help. So after uninstall old version sudo i don't have any working sudo in system XD 
I don't have backup of this machine and i can't reinstall this machine. Guys pls help me.
How to repair my sudo and how i need to upgrade sudo.
Thanx


----------



## Alexander88207 (Feb 10, 2021)

Please only build your programs from the ports, as simply installing them directly from the source cannot be or is hard to control or manage.









						Chapter 4. Installing Applications: Packages and Ports
					

FreeBSD provides two complementary technologies for installing third-party software: the FreeBSD Ports Collection, for installing from source, and packages, for installing from pre-built binaries




					docs.freebsd.org


----------



## a6h (Feb 10, 2021)

Alexander88207 is correct.
But if you want to do it manually, or get familiar with lower level procedure, first take a look at FreeBSD Porters Handbook.


----------



## SirDice (Feb 10, 2021)

Cvezda said:


> I decided to upgrade my sudo from 1.8.20p2_2 to sudo 1.9.5p2


Use pkg-upgrade(8).


----------



## Cvezda (Feb 10, 2021)

SirDice said:


> Use pkg-upgrade(8).


Try to upgrade by pkg-upgrade sudo

```
Updating FreeBSD repository catalogue...
pkg: repository meta /var/db/pkg/FreeBSD.meta has wrong version 2
pkg: Repository FreeBSD load error: meta cannot be loaded No error: 0
Fetching meta.txz: 100%    916 B   0.9kB/s    00:01    
pkg: repository meta /var/db/pkg/FreeBSD.meta has wrong version 2
repository FreeBSD has no meta file, using default settings
Fetching packagesite.txz: 100%    6 MiB   1.0MB/s    00:06    
pkg: repository meta /var/db/pkg/FreeBSD.meta has wrong version 2
pkg: Repository FreeBSD load error: meta cannot be loaded No error: 0
Unable to open created repository FreeBSD
Unable to update repository FreeBSD
Error updating repositories!
```


----------



## SirDice (Feb 10, 2021)

Looks like you haven't updated anything in a while. Try `pkg bootstrap -f` to fix this.


----------

