centos7

why is mimetypes.guess_type('a.json') not working in centos 7

故事扮演 提交于 2019-12-12 17:30:18
问题 In Centos, why is python 2.7 prebuilt library mimetypes.guess_type not returning mimetype for json files? https://docs.python.org/2/library/mimetypes.html# I am using guess_type in mimetypes and it returns different value in centos/ubuntu. What's the pythonic way to deduce mimetype from filename in different OS? In ubuntu 14.04, it returns the correct mime type >>> import mimetypes >>> mimetypes.guess_type('a.json') ('application/json', None) But in Centos7 >>> import mimetypes >>> mimetypes

Qt version in centos7

*爱你&永不变心* 提交于 2019-12-12 16:47:03
问题 I am using centos 7. To check the version of qt installed I am using the command qmake --version which returns Qmake version: 1.07a (Qt 3.3.8b). Qmake is free software from Trolltech ASA. However when I give the command yum install qt , I get the message Package 1:qt-4.8.5-13.el7.x86_64 already installed and latest version. Nothing to do. I am not sure which version of qt is installed in my system! I need to have a qt version > 4.7. 回答1: Qt is designed to support multiple parallel

I can't install any package related to PHP with yum

一个人想着一个人 提交于 2019-12-12 13:14:56
问题 I can't install any package related PHP, I get a yum error: No package php available . My PHP version is 5.4.37 on Centos 7. I installed remi for other purposes and I think that the repository is not compatible with PHP version but I don't know how to fix it. [root@server ~]# sudo yum install php php-pear Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile * base: centosmirror.netcup.net * epel: mirrors.n-ix.net * extras: centosmirror.netcup.net * remi: mirror5.layerjet

Install lxml on Centos 7 - error: command 'gcc' failed with exit status 4

纵饮孤独 提交于 2019-12-12 07:13:35
问题 I'm using python 3.4 in a virtual environment: (af)[root@domain backend]# pip --version pip 7.1.0 from /home/af/af-stage/backend/.ves/af/lib/python3.4/site-packages (python 3.4) Installation of lxml failed "error: command 'gcc' failed with exit status 4": (af)[root@domain backend]# pip install lxml You are using pip version 7.1.0, however version 7.1.2 is available. You should consider upgrading via the 'pip install --upgrade pip' command. Collecting lxml Using cached lxml-3.5.0.tar.gz

Exporting multiple line code without changes using echo / linux

自作多情 提交于 2019-12-12 05:38:31
问题 System CentOS 7.2 Looking for a solution to write multi line code to a file without changes small piece form a code: echo ' sed -i $'45 a \n' /usr/local/nagios/etc/nagios.cfg && sed -i $'45 a \n' /usr/local/nagios/etc/nagios.cfg && sed -i $'45 a \n' /usr/local/nagios/etc/nagios.cfg && sed -i '46s#.*#cfg_file=/usr/local/nagios/etc/hosts.cfg#' /usr/local/nagios/etc/nagios.cfg && sed -i '47s#.*#cfg_file=/usr/local/nagios/etc/services.cfg#' /usr/local/nagios/etc/nagios.cfg && sed -i $'48 a \n'

PHP 7.1: no cURL with HTTP/2

亡梦爱人 提交于 2019-12-12 04:03:29
问题 My question is not about finding out if a server supports HTTP/2 (they both do) but how to make sure PHP is utilizing HTTP/2 with the correct cURL settings for the most current PHP version in CentOS (built from Remi's repository). My own answer addresses some oddities concerning this. I've setup my CentOS 7 server to support HTTP/2 with the help of this fine guide: Setting up HTTP/2 on your web server So I've got the latest releases, compiled and installed them and all is working fine. Pages

Oci_connect function is undefined in CentOS with Oracle

巧了我就是萌 提交于 2019-12-12 03:25:22
问题 oracle database connectivity issue in php with oci_connect function is undefined on linux centOs 7 follows this article too. Centos 6 PHP OCI8 extention is not working (Undefined function oci_connect()) Not found perfect solution for this. 回答1: You need install [OCI8] extension in php.ini: Install both RPM packages: rpm -ivh instantclient-basic-linux.XXX.rpm rpm -ivh instantclient-sdk-linux.XXX.rpm Install some prerequisite: yum install php-pear yum install php-devel Download the OCI8

Virtual Hosts in CentOS 7 + Laravel

雨燕双飞 提交于 2019-12-12 00:46:27
问题 I have problems with my VirtualHosts The Directory of the website is /var/www/html/laravel The httpd.conf file is When open the website show me this error: Somebody can help me? Thanks 回答1: I found a Solution! I have many sites in /var/www/html folder. www.example.com/site1 www.example.com/site2 ... The solution is create one alias for each site in httpd.conf . example: Alias /site1 /var/www/html/site1 <VirtualHost *:80> DocumentRoot "/var/www/html/site1" </VirtualHost> Alias /laravel /var

Failed to install R on Centos 7

此生再无相见时 提交于 2019-12-11 23:34:17
问题 I have CentOS 7 (3.10.0-123.el7.x86_64) and I seem not be able to install R and then get Rstudio server working. This is what I did: rpm -Uvh http://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm yum install R Then I got this error: Transaction check error: file /usr/lib/systemd/system/blk-availability.service from install of device-mapper-7:1.02.107-5.el7_2.1.x86_64 conflicts with file from package lvm2-7:2.02.105-14.el7.x86_64 file /usr/sbin/blkdeactivate from install of

Centos 7 Remote SSH access denied [closed]

浪尽此生 提交于 2019-12-11 23:16:36
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 3 years ago . I installed Centos7, all fine, till I want to access via SSH, I get always Access Denied. I get it with the root user, and another new created user I tested SSH within the LAN, so no firewall issue For the root user "PermitRootLogin yes" is set. SSH service is started ... till now, I have no clue what I ignored