Error: [/usr/share/dotnet/host/fxr] does not exist

When

Occurs when running dotnet publish --configuration Release or dotnet run

Cause

conflict between the microsoft and ubuntu package repository when dotnet was installed

Solution

Remove all installed dotnet packages

sudo apt remove dotnet* aspnetcore* netstandard*

create a dotnet preference file in /etc/apt/preferences.d with a name like dotnet.pref

Package: *
Pin: origin "packages.microsoft.com"
Pin-Priority: 1001

reinstall dotnet

sudo apt update
sudo apt install -y dotnet-sdk-6.0

Angular 404 or 500 on refresh

create .htaccess file at public_html root

# WHERE directory = the sub-directory AND domain = the domain
RewriteRule ^directory https://www.domain.com [L,R=301]

Could not fetch URL https://pypi.org … There was a problem confirming the ssl certificate.

// Full error message
Could not fetch URL https://pypi.org/simple/autopep8/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='some.host.net', port=444): Max retries exceeded with url: /?cfru=aHR0cHM6Ly9weXBpLm9yZy9zaW1wbGUvYXV0b3BlcDgv (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1108)'))) - skipping

// This could mean there is no local certificate to read from. See this post

Could not install packages due to an EnvironmentError [Error 13] Permission denied:

// error message when installing a pip package
ERROR: Could not install packages due to an EnvironmentError: [Errno 13] Permission denied: 'C:\\Python38\\Lib\\site-packages\\__pycache__\\pycodestyle.cpython-38.pyc'
Consider using the `--user` option or check the permissions.

// just add --user to the command. ex:
python -m pip install autopep8 --user --trusted-host files.pythonhosted.org --trusted-host pypi.org

nginx error with Angular routing

404 Not Found

nginx/1.14.0 (Ubuntu)

Solution:

/etc/nginx/sites-available/yoursite

#change this line:
try_files $uri $uri/ =404;
#to this:
try_files $uri $uri/ /index.html;
#then restart nginx
sudo systemctl restart nginx

Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by ‘SSLError(SSLError(1, u'[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:726)’),)’: /simple/pylint/ >>>>>>>> Could not fetch URL https://pypi.python.org/simple/setuptools/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host=’pypi.python.org’, port=443): Max retries exceeded with url: /simple/setuptools/ (Caused by SSLError(SSLError(1, u'[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:726)’),)) – skipping



// add the following flag to the pip command:

--trusted-host files.pythonhosted.org --trusted-host pypi.org

// or wherever the error indicates a problem in

<error message>... HTTPSConnectionPool(host='pypi.python.org', port=443)

Fix “is not digitally signed” powershell error

#Open powershell as administrator
Get-ExecutionPolicy -List
         Scope               ExecutionPolicy
         -----               ---------------
 MachinePolicy               Undefined
    UserPolicy               Undefined
       Process               Unrestricted
   CurrentUser               Unrestricted
  LocalMachine               Unrestricted

#Set all to Unrestricted where allowed. The first two are usually managed by group policy.

Set-ExecutionPolicy Unrestricted -Scope Process
#type Y and press enter