sexta-feira, março 29, 2024

PfSense update error ERROR: It was not possible to determine pkg remote version

Error updating pfsense from console, error:


Enter an option: 13


ERROR: It was not possible to determine pkg remote version

>>> Updating repositories metadata... 

Updating pfSense-core repository catalogue...

pkg-static: An error occured while fetching package

pkg-static: An error occured while fetching package

repository pfSense-core has no meta file, using default settings

pkg-static: An error occured while fetching package

pkg-static: An error occured while fetching package

Unable to update repository pfSense-core

Updating pfSense repository catalogue...

pkg-static: An error occured while fetching package

pkg-static: An error occured while fetching package

repository pfSense has no meta file, using default settings

pkg-static: An error occured while fetching package

pkg-static: An error occured while fetching package

Unable to update repository pfSense

Error updating repositories!

ERROR: It was not possible to determine pfSense-upgrade remote version

ERROR: It was not possible to determine pfSense-upgrade remote version

>>> Upgrading pfSense-upgrade... failed.



$ pfSense-upgrade -c

ERROR: It was not possible to determine pkg remote version

>>> Updating repositories metadata... failed.

ERROR: It was not possible to determine pfSense remote version

ERROR: It was not possible to determine pfSense-base remote version

ERROR: It was not possible to determine pfSense-kernel-pfSense remote version



$ pkg-static clean -ay ; pkg-static install -fy pkg pfSense-repo pfSense-upgrade

pkg-static: Repository pfSense-core missing. 'pkg update' required

pkg-static: No package database installed.  Nothing to do!

Updating pfSense-core repository catalogue...

pkg-static: An error occured while fetching package

pkg-static: An error occured while fetching package

repository pfSense-core has no meta file, using default settings

pkg-static: An error occured while fetching package

pkg-static: An error occured while fetching package

Unable to update repository pfSense-core

Updating pfSense repository catalogue...

pkg-static: An error occured while fetching package

pkg-static: An error occured while fetching package

repository pfSense has no meta file, using default settings

pkg-static: An error occured while fetching package

pkg-static: An error occured while fetching package

Unable to update repository pfSense

Error updating repositories!



All the above commands were failing due to certificate chain outdated.

With the following command you are able to check
$ pfSense-repoc

$ pkg-static -d update


Sample output:


DBG(1)[31490]> pkg initialized

Updating pfSense-core repository catalogue...

DBG(1)[31490]> PkgRepo: verifying update for pfSense-core

DBG(1)[31490]> PkgRepo: need forced update of pfSense-core

DBG(1)[31490]> Pkgrepo, begin update of '/var/db/pkg/repo-pfSense-core.sqlite'

DBG(1)[31490]> Request to fetch pkg+https://pkg.pfsense.org/pfSense_v2_7_2_amd64-core/meta.conf

DBG(1)[31490]> curl_open

DBG(1)[31490]> Fetch: fetcher used: pkg+https

DBG(1)[31490]> curl> fetching https://pkg.pfsense.org/pfSense_v2_7_2_amd64-core/meta.conf


DBG(1)[31490]> CURL> attempting to fetch from , left retry 3


* Couldn't find host pkg00-atx.netgate.com in the .netrc file; using defaults

*   Trying 208.123.73.207:443...

* Connected to pkg00-atx.netgate.com (208.123.73.207) port 443

* ALPN: curl offers http/1.1

*  CAfile: none

*  CApath: /etc/ssl/certs/

* SSL certificate problem: self-signed certificate in certificate chain

* Closing connection

DBG(1)[31490]> CURL> attempting to fetch from , left retry 2


* Couldn't find host pkg01-atx.netgate.com in the .netrc file; using defaults

*   Trying 208.123.73.209:443...

* Connected to pkg01-atx.netgate.com (208.123.73.209) port 443

* ALPN: curl offers http/1.1

*  CAfile: none

*  CApath: /etc/ssl/certs/

* SSL certificate problem: self-signed certificate in certificate chain

* Closing connection

DBG(1)[31490]> CURL> attempting to fetch from , left retry 1



$ pkg-static -d updatecertctl rehash

$ certctl rehash


Will update certificates.


run: 

$ pkg-static upgrade -f pfSense-repoc


Ignore the mismatch and continue? [y/N]: y


rerun update from console.


terça-feira, junho 27, 2023

Powershell Microsoft.PowerShell_profile.ps1 is not digitally signed

 PowerShell running .ps1 files not signed and remote


. : File c:\Documents\WindowsPowerShell\Microsoft.PowerShell_profile.ps1 cannot be loaded. The file C:\Users\xxx\\Documents\WindowsPowerShell\Microsoft.PowerShell_profile.ps1 is not digitally signed. You cannot run this script on the current system. For more information about running scripts and setting execution policy, see about_Execution_Policies at https:/go.microsoft.com/fwlink/?LinkID=135170.At line:1 char:3

    + CategoryInfo          : SecurityError: (:) [], PSSecurityException

    + FullyQualifiedErrorId : UnauthorizedAccess



Fix:

Unblock-File -Path 'C:\Users\xxx\Documents\WindowsPowerShell\Microsoft.PowerShell_profile.ps1'

quinta-feira, abril 06, 2023

Remove anydesk printer driver from windows 11

 Open CMD with Admin privilegies


Run

pnputil.exe /delete-driver c:\Windows\System32\DriverStore\FileRepository\anydeskprintdriver.inf_amd64_07b22d0a6997cb3a\anydeskprintdriver.inf /uninstall

Or find your .inf folder.

Reference

https://learn.microsoft.com/en-us/windows-hardware/drivers/install/how-devices-and-driver-packages-are-uninstalled