Thursday, January 26, 2023

How to Fix Error: Failed to Download Metadata for Repo ‘AppStream’

To fix the above error, open your terminal or login via ssh or terminal, and run the following commands to change the repo URL to point to vault.centos.org, from the official CentOS repos.

Here we use the sed command to edit the required directives or parameters in the repo configuration files:

# sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-*

# sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-*


Alternatively, you can also point to the Cloudflare-based vault repository, by running the following commands:

# sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-Linux-*

# sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.epel.cloud|g' /etc/yum.repos.d/CentOS-Linux-*

Now you should be able to update CentOS or install packages without any error:



Thursday, January 19, 2023

Error on your browser: the website sent back unusual and incorrect credentials


Normally uses encryption to protect your information when Chrome tried to connect to

.... the website sent back unusual and incorrect credentials .....


as they say, your browser has HSTS problem. 

Usually you need to make sure your Webmin configuration. Yaa, I mean this case maybe occurs on your access to port 10000. 

I thing your SSL was worked to all domain but not to Webmin, so to resolve it, you can go to /etc/webmin/miniserv.conf

add new line to that file:

inetd_ssl=1

save and restart Webmin. So you can check it with your domain such as: https://mydomain.com:10000


Problem:

Message: Array and string offset access syntax with curly braces is deprecated

Resolve:

search variable with {0} change it to [0]

-------

Problem:

Trying to access array offset on value of type int cell/DefaultValueBinder.php

} elseif ($pValue[0] === '=' && strlen($pValue) > 1) {

Resolve:

} elseif (0 === strpos($pValue, '=') && strlen($pValue) > 1) {

-------

Problem:

Fatal error: Cannot use isset() on the result of an expression (you can use "null !== expression" instead) in htdocs

A PHP Error was encountered

Severity: Compile Error

Message: Cannot use isset() on the result of an expression (you can use "null !== expression" instead)

Resolve:

change isset($param) to (null !== $param)

-------