CentOS 5.11 yum -y update error - centos5

I have setup docker and i am putting centos using this command from docker file
FROM centos:5.11
When i login to centos and type the yum -y update , i am getting the following error:
yum -y update
Loaded plugins: fastestmirror
Determining fastest mirrors
YumRepo Error: All mirror URLs are not using ftp, http[s] or file.
Eg. Invalid release/
removing mirrorlist with no valid mirrors: /var/cache/yum/base/mirrorlist.txt
Error: Cannot find a valid baseurl for repo: base
I tried the suggestion from this website
YumRepo Error: All mirror URLs are not using ftp, http[s] or file

Related

building singularity image for python script in centOS linux

I am trying to build singularity image in centOS linux. to do so I have make the following Singularity.recipe:
Bootstrap: yum
OSVersion: 7
MirrorURL: http://mirror.centos.org/centos-%{OSVERSION}/%{OSVERSION}/os/x86_64/
Include: yum
%post
yum -y install epel-release
yum -y install python34
%file
QC.py /
%runscript
python3 /QC.py
and then I used this command to build the image:
sudo singularity build test.simg Singularity.recipe
but I gave this error:
FATAL: Unable to build from Singularity.recipe: while parsing definition: Singularity.recipe: invalid section(s) specified: file
do you know how to solve the problem?
As the error message says, %file is not a valid section name. The correct section name is %files.

apache2: ERROR: Module not properly enabled

I am getting this error:
ERROR: Module wsgi not properly enabled:
/etc/apache2/mods-enabled/wsgi.load is a real file, not touching it
I have this:
USER root
RUN apt-get install -y apache2
RUN a2enmod wsgi
does anyone know what this error would signify?
I can't figure out how to resolve it.
if I forgo the a2enmod wsgi line, then I get:
/usr/lib/apache2/modules/mod_wsgi.so: cannot open shared object file:
No such file or directory
The error means that the file or directory mod_wsgi.so doesn't exist on your server. You may follow the instructions below on how to enable this module.
SSH to your machine.
Once you'r logged in, please execute the following commands below:
$ sudo apt-get install libapache2-mod-wsgi
$ sudo a2enmod wsgi
Please execute the find command to locate the mod_wsgi.so module.
$ sudo find / -name *mod_wsgi.so
You should see this result.
/usr/lib/apache2/modules/mod_wsgi.so
Furthermore, to install apache2 please execute the command below:
$ sudo apt-get install apache2 -y
Hope this information works for you.

PHP Startup: Unable to load dynamic library 'php_mysqli' in codeigniter ubuntu

I have installed php7.2, apache and mysql.
When I copied codeigniter folder in my var/www/html it runs but give one error as
A PHP Error was encountered
Severity: Core Warning
Message: PHP Startup: Unable to load dynamic library 'php_mysqli'
(tried: /usr/lib/php/20170718/php_mysqli
(/usr/lib/php/20170718/php_mysqli: cannot open shared object file: No
such file or directory), /usr/lib/php/20170718/php_mysqli.so
(/usr/lib/php/20170718/php_mysqli.so: cannot open shared object file:
No such file or directory))
Filename: Unknown
Line Number: 0
Backtrace:
I search for the same and tried with different solution as updating php.ini file but still getting the same error.
I am using Ubuntu 18.04.1 LTS OS
Your help would be appreciated.
Thanks.
Install php extension for mysql.
use this command
sudo apt-get install php-mysql
After installation restart apache with this command
sudo service apache2 restart
update
If sudo apt-get install php-mysql
not work for you then you should use
sudo apt-get install php7.2-mysql
You should open php.ini file and check if the line:
extension=mysqli.so
presented and not commented with # sign

'Error parsing "baseurl = 'repository_url'"' error when trying to install NFS server

I'm trying to install an NFS server, but I keep getting this error:
root#wsm-ela-inc6:/home/test# yum -y install nfs-utils nfs-utils-lib
Repository 'repository_url': Error parsing config: Error parsing "baseurl = 'repository_url'": URL must be http, ftp, file or https not ""
There are no enabled repos.
Run "yum repolist all" to see the repos you have.
You can enable repos with yum-config-manager --enable <repo>
It asks to enable repos. How can I do that? Which repos do I have to enable?
I'm working on Ubuntu.

PHP Fatal error: Class 'Phalcon\Script\Color' not found

I'm running Ubuntu Server 12.10 and have installed phalcon like this
sudo apt-get install php5-dev php5-mysql gcc git-core
git clone git://github.com/phalcon/cphalcon.git
cd cphalcon/build
sudo ./install
then I've added
extension=/usr/lib/php5/20100525/phalcon.so
to php.ini which located in /etc/php5/apache2/php.ini and restarted apache2. If I execute
<?php print_r(get_loaded_extensions()); ?>
I can see that the phalcon extension is loaded. Then I've installed phalcon-devtools like that
git clone git://github.com/phalcon/phalcon-devtools.git
cd phalcon-devtools
sudo ./phalcon.sh
and restarted apache2. No errors were shown during that operations, but when I'm trying to execute
phalcon commands
I get an error like this
PHP Fatal error: Class 'Phalcon\Script\Color' not found in /home/user/phalcon-devtools/phalcon.php on line 84
What I'm doing wrong?
So the problem was in php.ini for CLI, which is located in /etc/php5/cli/, after I added extension=/usr/lib/php5/20100525/phalcon.so there, I was able to use Devtools. Thanks to #NikolaosDimopoulos
Official documentation is a bit confusing so try this:
I think this is a problem of extension not loaded
After successfully compile steps:
sudo apt-get install php5-dev php5-mysql gcc git-core
git clone git https://github.com/Phalcon/cphalcon.git
cphalcon cd/build
sudo ./install
Create a new file called "30-phalcon.ini"
and within it call the extension Phalcon with this single line:
extension=phalcon.so
save the file and copy the folder "/etc/php5/apache2/conf.d /" and "/etc/php5/cli/conf.d/"
restart the server: sudo service apache2 restart
While the devtools do this:
sudo git clone https://github.com/phalcon/phalcon-devtools /var/www/devtools
then create a symbolic link to run via terminal:
1: sudo ln -s /var/www/devtools/phalcon.php /usr/bin/phalcon
2: sudo chmod ugo+x /usr/bin/phalcon
3: type "phalcon" in the terminal and see if it's work.
it should work now: D
I always install the devtools from the PEAR channel
pear channel-discover pear.phalconphp.com
pear install phalcon/Devtools
You might get an error that the Devtools are not in stable mode but (as of the time of this writing) you can use this command:
pear install phalcon/Devtools-0.5.0
Source