Install MPICH2 cannot fild libmpi.so.1 ( uninstalled openmpi already) - mpi

I installed mpich2 using:
./configure --prefix=/usr/mpich2-install --enable-threads --enable-shared
make
make install
But when I run a MPI program, there is a error:
./exe_framework: error while loading shared libraries: libmpi.so.1: cannot open shared object file: No such file or directory
Then, I modified LD_LIBRARY_PATH to : /usr/mpich2-install/lib. But the error is still there. I checked /usr/mpich2-install/lib. The out put of ls is:
-rw-r--r--. 1 root root 673560 Apr 8 17:44 libfmpich.a
-rwxr-xr-x. 1 root root 959 Apr 8 17:44 libfmpich.la
lrwxrwxrwx. 1 root root 19 Apr 8 17:44 libfmpich.so -> libfmpich.so.10.0.4
lrwxrwxrwx. 1 root root 19 Apr 8 17:44 libfmpich.so.10 -> libfmpich.so.10.0.4
-rwxr-xr-x. 1 root root 256790 Apr 8 17:44 libfmpich.so.10.0.4
-rw-r--r--. 1 root root 5631824 Apr 8 17:44 libmpich.a
-rw-r--r--. 1 root root 259262 Apr 8 17:44 libmpichcxx.a
-rwxr-xr-x. 1 root root 973 Apr 8 17:44 libmpichcxx.la
lrwxrwxrwx. 1 root root 21 Apr 8 17:44 libmpichcxx.so -> libmpichcxx.so.10.0.4
lrwxrwxrwx. 1 root root 21 Apr 8 17:44 libmpichcxx.so.10 -> libmpichcxx.so.10.0.4
-rwxr-xr-x. 1 root root 184546 Apr 8 17:44 libmpichcxx.so.10.0.4
-rw-r--r--. 1 root root 10994 Apr 8 17:44 libmpichf90.a
-rwxr-xr-x. 1 root root 973 Apr 8 17:44 libmpichf90.la
lrwxrwxrwx. 1 root root 21 Apr 8 17:44 libmpichf90.so -> libmpichf90.so.10.0.4
lrwxrwxrwx. 1 root root 21 Apr 8 17:44 libmpichf90.so.10 -> libmpichf90.so.10.0.4
-rwxr-xr-x. 1 root root 12833 Apr 8 17:44 libmpichf90.so.10.0.4
-rwxr-xr-x. 1 root root 1051 Apr 8 17:44 libmpich.la
lrwxrwxrwx. 1 root root 18 Apr 8 17:44 libmpich.so -> libmpich.so.10.0.4
lrwxrwxrwx. 1 root root 18 Apr 8 17:44 libmpich.so.10 -> libmpich.so.10.0.4
-rwxr-xr-x. 1 root root 2764100 Apr 8 17:44 libmpich.so.10.0.4
-rw-r--r--. 1 root root 23530 Apr 8 17:44 libmpl.a
-rwxr-xr-x. 1 root root 919 Apr 8 17:44 libmpl.la
lrwxrwxrwx. 1 root root 15 Apr 8 17:44 libmpl.so -> libmpl.so.1.0.0
lrwxrwxrwx. 1 root root 15 Apr 8 17:44 libmpl.so.1 -> libmpl.so.1.0.0
-rwxr-xr-x. 1 root root 20623 Apr 8 17:44 libmpl.so.1.0.0
-rw-r--r--. 1 root root 4052 Apr 8 17:44 libopa.a
-rwxr-xr-x. 1 root root 929 Apr 8 17:44 libopa.la
lrwxrwxrwx. 1 root root 15 Apr 8 17:44 libopa.so -> libopa.so.1.0.0
lrwxrwxrwx. 1 root root 15 Apr 8 17:44 libopa.so.1 -> libopa.so.1.0.0
-rwxr-xr-x. 1 root root 7380 Apr 8 17:44 libopa.so.1.0.0
drwxr-xr-x. 2 root root 4096 Apr 8 17:44 pkgconfig
There is no libmpi.so. I installed openMPI before. Now I have delete it using make uninstall. libmpi.so.1 is a file in openmpi/lib.
The PATH is:
/usr/mpich2-install/bin/:/usr/mpich2-install/bin/:/usr/mpich2-install/bin/:/usr/openmpi-install/bin/:/usr/openmpi-install/bin/:/usr/lib64/qt-3.3/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin
The LD_LIBRARY_PATH is:
/usr/mpich2-install/lib/
ldd exe_framework is:
linux-vdso.so.1 => (0x00007fff33bff000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x00000036f1e00000)
libm.so.6 => /lib64/libm.so.6 (0x00000036f2600000)
libmpich.so.10 => /usr/mpich2-install/lib/libmpich.so.10 (0x00007f71533a2000)
libopa.so.1 => /usr/mpich2-install/lib/libopa.so.1 (0x00007f71531a1000)
libmpl.so.1 => /usr/mpich2-install/lib/libmpl.so.1 (0x00007f7152f9c000)
librt.so.1 => /lib64/librt.so.1 (0x00000036f2200000)
libc.so.6 => /lib64/libc.so.6 (0x00000036f1a00000)
/lib64/ld-linux-x86-64.so.2 (0x00000036f1200000)
libgfortran.so.3 => /usr/lib64/libgfortran.so.3 (0x00007f7152ca9000)
libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00000036fd600000)
Am I wrong during installation?

Related

using systemctl --root for a different root directory

I am working on point of sale bootp terminals. The client application, OS etc. and all its files live under /opt/posterm/x86_64/.../
ll /opt/posterm/x86_64
total 16
lrwxrwxrwx. 1 root root 7 Jul 31 2020 bin -> usr/bin
dr-xr-xr-x. 5 root root 4096 Sep 21 2021 boot
drwxr-xr-x. 2 root root 30 Jul 21 2021 dev
drwxr-xr-x. 84 root root 8192 Nov 22 2021 etc
drwxr-xr-x. 2 root root 6 Jul 31 2020 home
lrwxrwxrwx. 1 root root 7 Jul 31 2020 lib -> usr/lib
lrwxrwxrwx. 1 root root 9 Jul 31 2020 lib64 -> usr/lib64
drwxr-xr-x. 3 root root 27 Jul 29 2021 media
drwxr-xr-x. 2 root root 6 Jul 31 2020 mnt
drwxr-xr-x. 3 root root 24 Sep 15 2021 opt
dr-xr-xr-x. 2 root root 6 Jul 31 2020 proc
dr-xr-x---. 2 root root 112 Sep 29 2021 root
drwxr-xr-x. 14 root root 178 Jul 21 2021 run
lrwxrwxrwx. 1 root root 8 Jul 31 2020 sbin -> usr/sbin
drwxr-xr-x. 2 root root 6 Jul 31 2020 srv
dr-xr-xr-x. 2 root root 6 Jul 31 2020 sys
drwxrwxrwt. 7 root root 93 Oct 1 2021 tmp
drwxr-xr-x. 12 root root 144 Jul 21 2021 usr
drwxr-xr-x. 20 root root 278 Sep 21 2021 var
I was able to create the service however im not certain its right since the is-enabled command output shows me nothing. Why?
[root#zzpoxxxx]# systemctl enable posterm.service --root=/opt/posterm/x86_64
Created symlink /opt/posterm/x86_64/etc/systemd/system/multi-user.target.wants/posterm.service → /etc/systemd/system/posterm.service.
systemctl is-enabled --root=/opt/posterm/i386 posterm.service
systemctl is-enabled posterm.service --root=/opt/posterm/i386
[root#zzxxxxx]# echo $?
1
system]# find / -name posterm.service |xargs ls -al
lrwxrwxrwx. 1 root root 35 Nov 15 13:37 /opt/posterm/x86_64/etc/systemd/system/multi-user.target.wants/posterm.service -> /etc/systemd/system/posterm.service
-rw-r--r--. 1 root root 236 Nov 15 11:43 /opt/posterm/x86_64/etc/systemd/system/posterm.service
-rw-r--r--. 1 root root 236 Nov 15 11:38 /opt/posterm/x86_64/usr/lib/systemd/system/posterm.service
any help much appreciated!?
thank you!

How do I fix this error `warning: Dependency 'Qt.webengine' not found for product '. `?

I am getting this error when saving QBS:
warning: Dependency 'Qt.webengine' not found for product 'anime-dl'.
Here is the profile in the settings::
This should not be happening because I built this explicitly, as well as it does not happen if I throw this in a QMake Project File:
QT += core gui multimedia webengine webenginewidgets multimediawidgets
And its included in the qt that I built:
➜ Qt-5.15.2 ll include
total 472K
drwxr-xr-x 3 root root 4.0K Jan 22 20:16 Qt3DAnimation
drwxr-xr-x 3 root root 4.0K Jan 22 20:16 Qt3DCore
drwxr-xr-x 3 root root 4.0K Jan 22 20:16 Qt3DExtras
drwxr-xr-x 3 root root 4.0K Jan 22 20:16 Qt3DInput
drwxr-xr-x 3 root root 4.0K Jan 22 20:16 Qt3DLogic
drwxr-xr-x 3 root root 4.0K Jan 22 20:16 Qt3DQuick
drwxr-xr-x 3 root root 4.0K Jan 22 20:16 Qt3DQuickAnimation
drwxr-xr-x 3 root root 4.0K Jan 22 20:16 Qt3DQuickExtras
drwxr-xr-x 3 root root 4.0K Jan 22 20:16 Qt3DQuickInput
drwxr-xr-x 3 root root 4.0K Jan 22 20:16 Qt3DQuickRender
drwxr-xr-x 3 root root 4.0K Jan 22 20:16 Qt3DQuickScene2D
drwxr-xr-x 3 root root 12K Jan 22 20:16 Qt3DRender
drwxr-xr-x 3 root root 4.0K Jan 22 20:15 QtAccessibilitySupport
drwxr-xr-x 3 root root 4.0K Jan 22 20:16 QtBluetooth
drwxr-xr-x 3 root root 4.0K Jan 22 20:16 QtBodymovin
drwxr-xr-x 3 root root 4.0K Jan 22 20:16 QtCharts
drwxr-xr-x 2 root root 4.0K Jan 22 20:15 QtConcurrent
drwxr-xr-x 3 root root 20K Jan 22 20:15 QtCore
drwxr-xr-x 3 root root 4.0K Jan 22 20:16 QtDataVisualization
drwxr-xr-x 3 root root 4.0K Jan 22 20:15 QtDBus
drwxr-xr-x 3 root root 4.0K Jan 22 20:16 QtDesigner
drwxr-xr-x 3 root root 4.0K Jan 22 20:16 QtDesignerComponents
drwxr-xr-x 3 root root 4.0K Jan 22 20:15 QtDeviceDiscoverySupport
drwxr-xr-x 3 root root 4.0K Jan 22 20:15 QtEdidSupport
drwxr-xr-x 3 root root 4.0K Jan 22 20:15 QtEglFSDeviceIntegration
drwxr-xr-x 3 root root 4.0K Jan 22 20:15 QtEglSupport
drwxr-xr-x 3 root root 4.0K Jan 22 20:15 QtEventDispatcherSupport
drwxr-xr-x 3 root root 4.0K Jan 22 20:15 QtFbSupport
drwxr-xr-x 3 root root 4.0K Jan 22 20:15 QtFontDatabaseSupport
drwxr-xr-x 3 root root 4.0K Jan 22 20:16 QtGamepad
drwxr-xr-x 3 root root 4.0K Jan 22 20:15 QtGlxSupport
drwxr-xr-x 3 root root 20K Jan 22 20:15 QtGui
drwxr-xr-x 3 root root 4.0K Jan 22 20:17 QtHelp
drwxr-xr-x 3 root root 4.0K Jan 22 20:15 QtInputSupport
drwxr-xr-x 3 root root 4.0K Jan 22 20:15 QtKmsSupport
drwxr-xr-x 3 root root 4.0K Jan 22 20:15 QtLinuxAccessibilitySupport
drwxr-xr-x 3 root root 4.0K Jan 22 20:16 QtLocation
drwxr-xr-x 3 root root 12K Jan 22 20:16 QtMultimedia
drwxr-xr-x 3 root root 4.0K Jan 22 20:16 QtMultimediaGstTools
drwxr-xr-x 3 root root 4.0K Jan 22 20:16 QtMultimediaQuick
drwxr-xr-x 3 root root 4.0K Jan 22 20:16 QtMultimediaWidgets
drwxr-xr-x 3 root root 4.0K Jan 22 20:15 QtNetwork
drwxr-xr-x 3 root root 4.0K Jan 22 20:15 QtNetworkAuth
drwxr-xr-x 3 root root 4.0K Jan 22 20:16 QtNfc
drwxr-xr-x 3 root root 4.0K Jan 22 20:15 QtOpenGL
drwxr-xr-x 2 root root 4.0K Jan 22 20:15 QtOpenGLExtensions
drwxr-xr-x 3 root root 4.0K Jan 22 20:15 QtPacketProtocol
drwxr-xr-x 3 root root 4.0K Jan 22 20:17 QtPdf
drwxr-xr-x 3 root root 4.0K Jan 22 20:17 QtPdfWidgets
drwxr-xr-x 3 root root 4.0K Jan 22 20:15 QtPlatformCompositorSupport
drwxr-xr-x 2 root root 4.0K Jan 22 20:15 QtPlatformHeaders
drwxr-xr-x 3 root root 4.0K Jan 22 20:16 QtPositioning
drwxr-xr-x 3 root root 4.0K Jan 22 20:16 QtPositioningQuick
drwxr-xr-x 3 root root 4.0K Jan 22 20:15 QtPrintSupport
drwxr-xr-x 3 root root 4.0K Jan 22 20:16 QtPurchasing
drwxr-xr-x 3 root root 4.0K Jan 22 20:15 QtQml
drwxr-xr-x 3 root root 4.0K Jan 22 20:16 QtQmlDebug
drwxr-xr-x 3 root root 4.0K Jan 22 20:15 QtQmlModels
drwxr-xr-x 3 root root 4.0K Jan 22 20:15 QtQmlWorkerScript
drwxr-xr-x 3 root root 4.0K Jan 22 20:15 QtQuick
drwxr-xr-x 3 root root 4.0K Jan 22 20:16 QtQuick3D
drwxr-xr-x 3 root root 4.0K Jan 22 20:16 QtQuick3DAssetImport
drwxr-xr-x 3 root root 4.0K Jan 22 20:16 QtQuick3DRender
drwxr-xr-x 3 root root 4.0K Jan 22 20:16 QtQuick3DRuntimeRender
drwxr-xr-x 3 root root 4.0K Jan 22 20:16 QtQuick3DUtils
drwxr-xr-x 3 root root 4.0K Jan 22 20:16 QtQuickControls2
drwxr-xr-x 3 root root 4.0K Jan 22 20:15 QtQuickParticles
drwxr-xr-x 3 root root 4.0K Jan 22 20:15 QtQuickShapes
drwxr-xr-x 3 root root 4.0K Jan 22 20:16 QtQuickTemplates2
drwxr-xr-x 3 root root 4.0K Jan 22 20:15 QtQuickTest
drwxr-xr-x 3 root root 4.0K Jan 22 20:15 QtQuickWidgets
drwxr-xr-x 3 root root 4.0K Jan 22 20:16 QtRemoteObjects
drwxr-xr-x 2 root root 4.0K Jan 22 20:16 QtRepParser
drwxr-xr-x 3 root root 4.0K Jan 22 20:17 QtScript
drwxr-xr-x 3 root root 4.0K Jan 22 20:17 QtScriptTools
drwxr-xr-x 3 root root 4.0K Jan 22 20:16 QtScxml
drwxr-xr-x 3 root root 4.0K Jan 22 20:16 QtSensors
drwxr-xr-x 3 root root 4.0K Jan 22 20:15 QtSerialBus
drwxr-xr-x 3 root root 4.0K Jan 22 20:15 QtSerialPort
drwxr-xr-x 3 root root 4.0K Jan 22 20:15 QtServiceSupport
drwxr-xr-x 3 root root 4.0K Jan 22 20:15 QtSql
drwxr-xr-x 3 root root 4.0K Jan 22 20:15 QtSvg
drwxr-xr-x 3 root root 4.0K Jan 22 20:15 QtTest
drwxr-xr-x 3 root root 4.0K Jan 22 20:16 QtTextToSpeech
drwxr-xr-x 3 root root 4.0K Jan 22 20:15 QtThemeSupport
drwxr-xr-x 2 root root 4.0K Jan 22 20:16 QtUiPlugin
drwxr-xr-x 3 root root 4.0K Jan 22 20:16 QtUiTools
drwxr-xr-x 3 root root 4.0K Jan 22 20:16 QtVirtualKeyboard
drwxr-xr-x 3 root root 4.0K Jan 22 20:15 QtVulkanSupport
drwxr-xr-x 3 root root 4.0K Jan 22 20:16 QtWaylandClient
drwxr-xr-x 3 root root 4.0K Jan 22 20:16 QtWaylandCompositor
drwxr-xr-x 3 root root 4.0K Jan 22 20:16 QtWebChannel
drwxr-xr-x 3 root root 4.0K Jan 22 20:17 QtWebEngine
drwxr-xr-x 3 root root 4.0K Jan 22 20:17 QtWebEngineCore
drwxr-xr-x 3 root root 4.0K Jan 22 20:17 QtWebEngineWidgets
drwxr-xr-x 3 root root 4.0K Jan 22 20:16 QtWebSockets
drwxr-xr-x 3 root root 4.0K Jan 22 20:17 QtWebView
drwxr-xr-x 3 root root 20K Jan 22 20:15 QtWidgets
drwxr-xr-x 2 root root 4.0K Jan 22 20:15 QtX11Extras
drwxr-xr-x 3 root root 4.0K Jan 22 20:15 QtXkbCommonSupport
drwxr-xr-x 3 root root 4.0K Jan 22 20:15 QtXml
drwxr-xr-x 3 root root 4.0K Jan 22 20:16 QtXmlPatterns
How can I fix this error? I am fairly certain it must be detecting the system installed version of Qt, as opposed to the one I built, and yet in profiles, it should be pointing to the one I built.
I don't exactly understand what was going on, but I did manage to settle the issue by switching from Desktop Kit to the Imported Kit, despite both of them having as far as I can tell, the same settings.

I can't use R CMD BUILD because I have no build file in R\R-3.4.0\bin

I have not build file in the binary of my version of R. Should I try to get it to be able to use R CMD BUILD (how?) or should I try to build a package in another way?
While INSTALL is capitalized (to avoid clashes with the existing /usr/bin/install, as are a few others as shown below), the build command is not:
edd#rob:~$ ls -l /usr/lib/R/bin/
total 488
-rwxr-xr-x 1 root root 1837 Jul 2 19:39 BATCH
-rwxr-xr-x 1 root root 350 Jul 2 19:39 build
-rwxr-xr-x 1 root root 317 Jul 2 19:39 check
-rwxr-xr-x 1 root root 2165 Jul 2 19:39 COMPILE
-rwxr-xr-x 1 root root 11377 Jul 2 19:39 config
drwxr-xr-x 2 root root 4096 Jul 15 20:25 exec
-rwxr-xr-x 1 root root 3618 Jul 2 19:39 f77_f2c
-rwxr-xr-x 1 root root 823 Jul 2 19:39 INSTALL
-rwxr-xr-x 1 root root 14530 Jul 2 19:39 javareconf
-rwxr-xr-x 1 root root 355913 Jul 2 19:39 libtool
-rwxr-xr-x 1 root root 1442 Jul 2 19:39 LINK
-rwxr-xr-x 1 root root 3496 Jul 2 19:39 mkinstalldirs
-rwxr-xr-x 1 root root 483 Jul 2 19:39 pager
-rwxr-xr-x 1 root root 8722 Jul 2 19:39 R
-rwxr-xr-x 1 root root 1375 Jul 2 19:39 Rcmd
-rwxr-xr-x 1 root root 316 Jul 2 19:39 Rd2pdf
-rwxr-xr-x 1 root root 359 Jul 2 19:39 Rdconv
-rwxr-xr-x 1 root root 258 Jul 2 19:39 Rdiff
-rwxr-xr-x 1 root root 158 Jul 2 19:39 REMOVE
-rwxr-xr-x 1 root root 310 Jul 2 19:39 Rprof
-rwxr-xr-x 1 root root 14344 Jul 2 19:39 Rscript
-rwxr-xr-x 1 root root 4121 Jul 2 19:39 rtags
-rwxr-xr-x 1 root root 155 Jul 2 19:39 SHLIB
-rwxr-xr-x 1 root root 318 Jul 2 19:39 Stangle
-rwxr-xr-x 1 root root 316 Jul 2 19:39 Sweave
edd#rob:~$
So make sure you type R CMD build ... instead.

Nginx: This site can't be reached; permissions configuration?

In the process of setting up nginx on a VPS and am getting the generic 'site can't be reached' error as described in the title. Here's /etc/nginx/sites-available/domainname.com
server {
listen 80 default_server;
listen [::]:80 default_server;
root /var/www/domainname.com/public;
index index.php index.html index.htm
server_name domainname.com;
location / {
try_files $uri $uri/ /index.php?$query_string;
}
location ~ \.php$ {
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/run/php/php7.0-fpm.sock;
}
location ~ /\.ht {
deny all;
}
}
This is sym-linked in /etc/nginx/sites-enabled. Both the domain name nor the IP address of the VPS return the same error. I recall a few months ago having a similar problem and ended up needing to alter certain file permissions, and even wrote down what happened, but cannot find my notes on the matter. Still, I suspect permissions to be part of the issue again.
As far as I know, the problem could be permissions on the contents of the nginx directory or of my php directory or the user running the nginx process. To that end, here's what ls -la returns for /etc/nginx:
ls -la -R /etc/nginx
/etc/nginx:
total 64
drwxr-xr-x 6 root root 4096 May 29 22:32 .
drwxr-xr-x 98 root root 4096 May 29 22:34 ..
drwxr-xr-x 2 root root 4096 Oct 27 2016 conf.d
-rw-r--r-- 1 root root 1077 Apr 26 2016 fastcgi.conf
-rw-r--r-- 1 root root 1007 Apr 26 2016 fastcgi_params
-rw-r--r-- 1 root root 2837 Apr 26 2016 koi-utf
-rw-r--r-- 1 root root 2223 Apr 26 2016 koi-win
-rw-r--r-- 1 root root 3957 Apr 26 2016 mime.types
-rw-r--r-- 1 root root 1462 Apr 26 2016 nginx.conf
-rw-r--r-- 1 root root 180 Apr 26 2016 proxy_params
-rw-r--r-- 1 root root 636 Apr 26 2016 scgi_params
drwxr-xr-x 2 root root 4096 May 29 23:25 sites-available
drwxr-xr-x 2 root root 4096 May 29 23:28 sites-enabled
drwxr-xr-x 2 root root 4096 May 29 22:32 snippets
-rw-r--r-- 1 root root 664 Apr 26 2016 uwsgi_params
-rw-r--r-- 1 root root 3071 Apr 26 2016 win-utf
/etc/nginx/conf.d:
total 8
drwxr-xr-x 2 root root 4096 Oct 27 2016 .
drwxr-xr-x 6 root root 4096 May 29 22:32 ..
/etc/nginx/sites-available:
total 12
drwxr-xr-x 2 root root 4096 May 29 23:25 .
drwxr-xr-x 6 root root 4096 May 29 22:32 ..
-rw-r--r-- 1 root root 2129 May 29 22:57 domainname
/etc/nginx/sites-enabled:
total 8
drwxr-xr-x 2 root root 4096 May 29 23:28 .
drwxr-xr-x 6 root root 4096 May 29 22:32 ..
lrwxrwxrwx 1 root root 34 May 29 22:32 default -> /etc/nginx/sites-available/default
lrwxrwxrwx 1 root root 40 May 29 23:28 domainname -> /etc/nginx/sites-available/domainname
/etc/nginx/snippets:
total 16
drwxr-xr-x 2 root root 4096 May 29 22:32 .
drwxr-xr-x 6 root root 4096 May 29 22:32 ..
-rw-r--r-- 1 root root 422 Apr 26 2016 fastcgi-php.conf
-rw-r--r-- 1 root root 217 Apr 26 2016 snakeoil.conf
And the output for /etc/php:
ls -la -R /etc/php
/etc/php:
total 12
drwxr-xr-x 3 root root 4096 May 29 22:34 .
drwxr-xr-x 98 root root 4096 May 29 22:34 ..
drwxr-xr-x 5 root root 4096 May 29 22:34 7.0
/etc/php/7.0:
total 20
drwxr-xr-x 5 root root 4096 May 29 22:34 .
drwxr-xr-x 3 root root 4096 May 29 22:34 ..
drwxr-xr-x 3 root root 4096 May 29 22:34 cli
drwxr-xr-x 4 root root 4096 May 29 22:40 fpm
drwxr-xr-x 2 root root 4096 May 29 22:34 mods-available
/etc/php/7.0/cli:
total 84
drwxr-xr-x 3 root root 4096 May 29 22:34 .
drwxr-xr-x 5 root root 4096 May 29 22:34 ..
drwxr-xr-x 2 root root 4096 May 29 22:34 conf.d
-rw-r--r-- 1 root root 70655 May 11 23:12 php.ini
/etc/php/7.0/cli/conf.d:
total 8
drwxr-xr-x 2 root root 4096 May 29 22:34 .
drwxr-xr-x 3 root root 4096 May 29 22:34 ..
lrwxrwxrwx 1 root root 39 May 29 22:34 10-opcache.ini -> /etc/php/7.0/mods-available/opcache.ini
lrwxrwxrwx 1 root root 35 May 29 22:34 10-pdo.ini -> /etc/php/7.0/mods-available/pdo.ini
lrwxrwxrwx 1 root root 40 May 29 22:34 20-calendar.ini -> /etc/php/7.0/mods-available/calendar.ini
lrwxrwxrwx 1 root root 37 May 29 22:34 20-ctype.ini -> /etc/php/7.0/mods-available/ctype.ini
lrwxrwxrwx 1 root root 36 May 29 22:34 20-exif.ini -> /etc/php/7.0/mods-available/exif.ini
lrwxrwxrwx 1 root root 40 May 29 22:34 20-fileinfo.ini -> /etc/php/7.0/mods-available/fileinfo.ini
lrwxrwxrwx 1 root root 35 May 29 22:34 20-ftp.ini -> /etc/php/7.0/mods-available/ftp.ini
lrwxrwxrwx 1 root root 39 May 29 22:34 20-gettext.ini -> /etc/php/7.0/mods-available/gettext.ini
lrwxrwxrwx 1 root root 37 May 29 22:34 20-iconv.ini -> /etc/php/7.0/mods-available/iconv.ini
lrwxrwxrwx 1 root root 36 May 29 22:34 20-json.ini -> /etc/php/7.0/mods-available/json.ini
lrwxrwxrwx 1 root root 40 May 29 22:34 20-mbstring.ini -> /etc/php/7.0/mods-available/mbstring.ini
lrwxrwxrwx 1 root root 41 May 29 22:34 20-pdo_pgsql.ini -> /etc/php/7.0/mods-available/pdo_pgsql.ini
lrwxrwxrwx 1 root root 37 May 29 22:34 20-pgsql.ini -> /etc/php/7.0/mods-available/pgsql.ini
lrwxrwxrwx 1 root root 36 May 29 22:34 20-phar.ini -> /etc/php/7.0/mods-available/phar.ini
lrwxrwxrwx 1 root root 37 May 29 22:34 20-posix.ini -> /etc/php/7.0/mods-available/posix.ini
lrwxrwxrwx 1 root root 40 May 29 22:34 20-readline.ini -> /etc/php/7.0/mods-available/readline.ini
lrwxrwxrwx 1 root root 37 May 29 22:34 20-shmop.ini -> /etc/php/7.0/mods-available/shmop.ini
lrwxrwxrwx 1 root root 39 May 29 22:34 20-sockets.ini -> /etc/php/7.0/mods-available/sockets.ini
lrwxrwxrwx 1 root root 39 May 29 22:34 20-sysvmsg.ini -> /etc/php/7.0/mods-available/sysvmsg.ini
lrwxrwxrwx 1 root root 39 May 29 22:34 20-sysvsem.ini -> /etc/php/7.0/mods-available/sysvsem.ini
lrwxrwxrwx 1 root root 39 May 29 22:34 20-sysvshm.ini -> /etc/php/7.0/mods-available/sysvshm.ini
lrwxrwxrwx 1 root root 41 May 29 22:34 20-tokenizer.ini -> /etc/php/7.0/mods-available/tokenizer.ini
/etc/php/7.0/fpm:
total 96
drwxr-xr-x 4 root root 4096 May 29 22:40 .
drwxr-xr-x 5 root root 4096 May 29 22:34 ..
drwxr-xr-x 2 root root 4096 May 29 22:34 conf.d
-rw-r--r-- 1 root root 4421 May 11 23:12 php-fpm.conf
-rw-r--r-- 1 root root 70997 May 29 22:40 php.ini
drwxr-xr-x 2 root root 4096 May 29 22:34 pool.d
/etc/php/7.0/fpm/conf.d:
total 8
drwxr-xr-x 2 root root 4096 May 29 22:34 .
drwxr-xr-x 4 root root 4096 May 29 22:40 ..
lrwxrwxrwx 1 root root 39 May 29 22:34 10-opcache.ini -> /etc/php/7.0/mods-available/opcache.ini
lrwxrwxrwx 1 root root 35 May 29 22:34 10-pdo.ini -> /etc/php/7.0/mods-available/pdo.ini
lrwxrwxrwx 1 root root 40 May 29 22:34 20-calendar.ini -> /etc/php/7.0/mods-available/calendar.ini
lrwxrwxrwx 1 root root 37 May 29 22:34 20-ctype.ini -> /etc/php/7.0/mods-available/ctype.ini
lrwxrwxrwx 1 root root 36 May 29 22:34 20-exif.ini -> /etc/php/7.0/mods-available/exif.ini
lrwxrwxrwx 1 root root 40 May 29 22:34 20-fileinfo.ini -> /etc/php/7.0/mods-available/fileinfo.ini
lrwxrwxrwx 1 root root 35 May 29 22:34 20-ftp.ini -> /etc/php/7.0/mods-available/ftp.ini
lrwxrwxrwx 1 root root 39 May 29 22:34 20-gettext.ini -> /etc/php/7.0/mods-available/gettext.ini
lrwxrwxrwx 1 root root 37 May 29 22:34 20-iconv.ini -> /etc/php/7.0/mods-available/iconv.ini
lrwxrwxrwx 1 root root 36 May 29 22:34 20-json.ini -> /etc/php/7.0/mods-available/json.ini
lrwxrwxrwx 1 root root 40 May 29 22:34 20-mbstring.ini -> /etc/php/7.0/mods-available/mbstring.ini
lrwxrwxrwx 1 root root 41 May 29 22:34 20-pdo_pgsql.ini -> /etc/php/7.0/mods-available/pdo_pgsql.ini
lrwxrwxrwx 1 root root 37 May 29 22:34 20-pgsql.ini -> /etc/php/7.0/mods-available/pgsql.ini
lrwxrwxrwx 1 root root 36 May 29 22:34 20-phar.ini -> /etc/php/7.0/mods-available/phar.ini
lrwxrwxrwx 1 root root 37 May 29 22:34 20-posix.ini -> /etc/php/7.0/mods-available/posix.ini
lrwxrwxrwx 1 root root 40 May 29 22:34 20-readline.ini -> /etc/php/7.0/mods-available/readline.ini
lrwxrwxrwx 1 root root 37 May 29 22:34 20-shmop.ini -> /etc/php/7.0/mods-available/shmop.ini
lrwxrwxrwx 1 root root 39 May 29 22:34 20-sockets.ini -> /etc/php/7.0/mods-available/sockets.ini
lrwxrwxrwx 1 root root 39 May 29 22:34 20-sysvmsg.ini -> /etc/php/7.0/mods-available/sysvmsg.ini
lrwxrwxrwx 1 root root 39 May 29 22:34 20-sysvsem.ini -> /etc/php/7.0/mods-available/sysvsem.ini
lrwxrwxrwx 1 root root 39 May 29 22:34 20-sysvshm.ini -> /etc/php/7.0/mods-available/sysvshm.ini
lrwxrwxrwx 1 root root 41 May 29 22:34 20-tokenizer.ini -> /etc/php/7.0/mods-available/tokenizer.ini
/etc/php/7.0/fpm/pool.d:
total 28
drwxr-xr-x 2 root root 4096 May 29 22:34 .
drwxr-xr-x 4 root root 4096 May 29 22:40 ..
-rw-r--r-- 1 root root 18508 May 11 23:12 www.conf
/etc/php/7.0/mods-available:
total 96
drwxr-xr-x 2 root root 4096 May 29 22:34 .
drwxr-xr-x 5 root root 4096 May 29 22:34 ..
-rw-r--r-- 1 root root 74 May 11 23:12 calendar.ini
-rw-r--r-- 1 root root 71 May 11 23:12 ctype.ini
-rw-r--r-- 1 root root 70 May 11 23:12 exif.ini
-rw-r--r-- 1 root root 74 May 11 23:12 fileinfo.ini
-rw-r--r-- 1 root root 69 May 11 23:12 ftp.ini
-rw-r--r-- 1 root root 73 May 11 23:12 gettext.ini
-rw-r--r-- 1 root root 71 May 11 23:12 iconv.ini
-rw-r--r-- 1 root root 68 May 11 23:12 json.ini
-rw-r--r-- 1 root root 76 May 11 23:12 mbstring.ini
-rw-r--r-- 1 root root 79 May 11 23:12 opcache.ini
-rw-r--r-- 1 root root 69 May 11 23:12 pdo.ini
-rw-r--r-- 1 root root 74 May 11 23:12 pdo_pgsql.ini
-rw-r--r-- 1 root root 70 May 11 23:12 pgsql.ini
-rw-r--r-- 1 root root 70 May 11 23:12 phar.ini
-rw-r--r-- 1 root root 71 May 11 23:12 posix.ini
-rw-r--r-- 1 root root 76 May 11 23:12 readline.ini
-rw-r--r-- 1 root root 71 May 11 23:12 shmop.ini
-rw-r--r-- 1 root root 73 May 11 23:12 sockets.ini
-rw-r--r-- 1 root root 73 May 11 23:12 sysvmsg.ini
-rw-r--r-- 1 root root 73 May 11 23:12 sysvsem.ini
-rw-r--r-- 1 root root 73 May 11 23:12 sysvshm.ini
-rw-r--r-- 1 root root 75 May 11 23:12 tokenizer.ini
Here are the relevant processes from ps aux
root 28217 0.0 2.8 287700 29156 ? Ss 22:48 0:00 php-fpm: master process (/etc/php/7.0/fpm/php-fpm.conf)
www-data 28221 0.0 0.6 287700 7052 ? S 22:48 0:00 php-fpm: pool www
www-data 28222 0.0 0.6 287700 7052 ? S 22:48 0:00 php-fpm: pool www
root 28405 0.0 0.1 124972 1416 ? Ss 23:00 0:00 nginx: master process /usr/sbin/nginx -g daemon on; master_process on;
www-data 28406 0.0 0.3 125308 3148 ? S 23:00 0:00 nginx: worker process
I have a user created in my name with sudo privileges on which I'm doing the actual work, but I'm not sure if I should be allocating permissions to that user or if I should instead be using www-data?
This error was resolved--now returns a 404 Not Found which is the expected behavior as I haven't pushed the app to the server yet--by modifying the following segment of /etc/nginx/sites-available/domainname
listen 80 default_server;
listen [::]:80 default_server;
Modified to
listen 80 default_server;
listen [::]:80 default_server ipv6only=on;
I had suspected this might be the problem but was convinced that in my previous run-in with this issue, I had tried this and had no success. At any rate, I hope this helps someone in the future.

Job for nginx.service failed because the control process exited with error code [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 2 years ago.
Improve this question
I follow the steps to setup a nginx server. After I create example.com.config and symbolic link for each server block in the sites-enabled directory. My nginx can't start.
I can't restart nginx service. It shows the following message when I entered
$sudo systemctl restart nginx.service
Job for nginx.service failed because the control process exited with error code.
See "systemctl status nginx.service" and "journalctl -xe" for details.
$sudo systemctl status nginx.service -l shows the following message.
● nginx.service - nginx - high performance web server
Loaded: loaded (/usr/lib/systemd/system/nginx.service; disabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Mon 2017-06-05 04:26:05 EDT; 1min 27s ago
Docs: http://nginx.org/en/docs/
Process: 4776 ExecStart=/usr/sbin/nginx -c /etc/nginx/nginx.conf (code=exited, status=1/FAILURE)
Process: 11491 ExecStartPre=/usr/sbin/nginx -t -c /etc/nginx/nginx.conf (code=exited, status=1/FAILURE)
Jun 05 04:26:05 localhost.localdomain systemd[1]: Starting nginx - high performance web server...
Jun 05 04:26:05 localhost.localdomain nginx[11491]: nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
Jun 05 04:26:05 localhost.localdomain nginx[11491]: nginx: [emerg] open() "/var/run/nginx.pid" failed (13: Permission denied)
Jun 05 04:26:05 localhost.localdomain nginx[11491]: nginx: configuration file /etc/nginx/nginx.conf test failed
Jun 05 04:26:05 localhost.localdomain systemd[1]: nginx.service: control process exited, code=exited status=1
Jun 05 04:26:05 localhost.localdomain systemd[1]: Failed to start nginx - high performance web server.
Jun 05 04:26:05 localhost.localdomain systemd[1]: Unit nginx.service entered failed state.
Jun 05 04:26:05 localhost.localdomain systemd[1]: nginx.service failed.
PS: I am running under CentOS 7 on virtualbox.
Please help me. Thank you.
Here's the output when I run ls -lart /var/run/
total 56
dr-xr-xr-x. 17 root root 233 Jun 2 05:37 ..
drwxr-xr-x. 2 root root 60 Jun 6 01:21 tmpfiles.d
drwxr-xr-x. 3 root root 60 Jun 6 01:21 log
drwxr-xr-x. 2 root root 60 Jun 6 01:21 mount
drwxr-xr-x. 4 root root 120 Jun 6 01:21 initramfs
prw-------. 1 root root 0 Jun 6 01:21 dmeventd-server
prw-------. 1 root root 0 Jun 6 01:21 dmeventd-client
drwx------. 2 root root 80 Jun 6 01:21 lvm
-rw-r--r--. 1 root root 4 Jun 6 01:21 lvmetad.pid
drwxr-xr-x. 2 root root 60 Jun 6 01:21 sysconfig
drwxr-xr-x. 2 root root 40 Jun 6 01:21 samba
drwxr-xr-x. 2 root root 40 Jun 6 01:21 setrans
drwxrwxr-x. 2 root root 40 Jun 6 01:21 netreport
drwxr-xr-x. 2 root root 40 Jun 6 01:21 faillock
drwx------. 2 rpc rpc 40 Jun 6 01:21 rpcbind
drwxr-xr-x. 2 root root 40 Jun 6 01:21 ppp
drwxrwxr-x. 3 root libstoragemgmt 60 Jun 6 01:21 lsm
drwxr-xr-x. 2 root root 40 Jun 6 01:21 spice-vdagentd
drwxr-xr-x. 2 root root 40 Jun 6 01:21 sepermit
drwxr-xr-x. 2 radvd radvd 40 Jun 6 01:21 radvd
drwx--x---. 2 root root 40 Jun 6 01:21 mdadm
drwxr-xr-x. 2 root root 40 Jun 6 01:21 certmonger
drwx--x--x. 2 setroubleshoot setroubleshoot 40 Jun 6 01:21 setroubleshoot
-rw-r--r--. 1 root root 4 Jun 6 01:21 auditd.pid
drwxr-xr-x. 2 root root 60 Jun 6 01:21 dbus
srw-rw-rw-. 1 root root 0 Jun 6 01:21 rpcbind.sock
drwxr-xr-x. 3 root lp 80 Jun 6 01:21 cups
drwxr-xr-x. 2 avahi avahi 80 Jun 6 01:21 avahi-daemon
-rw-------. 1 root root 11 Jun 6 01:21 alsactl.pid
-rw-r--r--. 1 root root 4 Jun 6 01:21 chronyd.pid
-rw-r--r--. 1 root root 4 Jun 6 01:21 ksmtune.pid
drwxr-xr-x. 2 root root 100 Jun 6 01:21 abrt
-rw-------. 1 root root 4 Jun 6 01:21 gssproxy.pid
srw-rw-rw-. 1 root root 0 Jun 6 01:21 gssproxy.sock
-rw-------. 1 root root 0 Jun 6 01:21 xtables.lock
drwxr-x---. 2 root root 40 Jun 6 01:21 firewalld
-rw-r--r--. 1 root root 4 Jun 6 01:21 dhclient-enp0s3.pid
drwxr-xr-x. 2 root root 80 Jun 6 01:21 NetworkManager
-rw-------. 1 root root 5 Jun 6 01:21 sm-notify.pid
drwxr-xr-x. 7 root root 180 Jun 6 01:21 lock
-rw-------. 1 root root 5 Jun 6 01:21 syslogd.pid
-rw-r--r--. 1 root root 5 Jun 6 01:21 sshd.pid
-rw-r--r--. 1 root root 5 Jun 6 01:21 crond.pid
-rw-r--r--. 1 root root 5 Jun 6 01:21 atd.pid
-rw-r--r--. 1 root root 4 Jun 6 01:21 libvirtd.pid
----------. 1 root root 0 Jun 6 01:21 cron.reboot
drwxr-xr-x. 2 root root 60 Jun 6 01:21 tuned
drwxr-xr-x. 6 root root 220 Jun 6 01:21 libvirt
drwxr-xr-x. 2 root root 40 Jun 6 01:21 plymouth
drwx------. 2 root root 40 Jun 6 01:22 udisks2
drwxr-xr-x. 2 root root 80 Jun 6 01:24 console
drwx--x--x. 4 root gdm 120 Jun 6 01:24 gdm
drwxr-xr-x. 3 root root 60 Jun 6 01:24 user
-rw-rw-r--. 1 root utmp 1536 Jun 6 01:24 utmp
drwxr-xr-x. 7 root root 160 Jun 6 01:24 udev
drwxr-xr-x. 17 root root 420 Jun 6 01:25 systemd
drwxr-xr-x. 37 root root 1140 Jun 6 01:25 .
ps -eaf |grep nginx
root 698 685 0 01:21 ? 00:00:00 runsv nginx
root 748 698 0 01:21 ? 00:00:00 svlogd -tt /var/log/gitlab/ngin
root 749 698 0 01:21 ? 00:00:00 nginx: master process /opt/gitlab/embedded/sbin/nginx -p /var/opt/gitlab/nginx
gitlab-+ 800 749 0 01:21 ? 00:00:00 nginx: worker process
gitlab-+ 801 749 0 01:21 ? 00:00:00 nginx: cache manager process
yen 6683 3840 0 01:44 pts/0 00:00:00 grep --color=auto nginx
Output of ps -eaf |grep nginx and netstat -tulpn |grep 80 before and after.
Here's the output of ps -eaf |grep nginx
root 669 1 0 21:50 ? 00:00:00 runsvdir -P /opt/gitlab/service log: svlogd: warning: unable to lock directory: /var/log/gitlab/nginx: temporary failure svlogd: fatal: no functional log directories. svlogd: warning: unable to lock directory: /var/log/gitlab/nginx: temporary failure svlogd: fatal: no functional log directories. svlogd: warning: unable to lock directory: /var/log/gitlab/nginx: temporary failure svlogd: fatal: no functional log directories. .....
root 4333 669 0 21:57 ? 00:00:00 runsv nginx
root 4348 4333 0 21:57 ? 00:00:00 svlogd -tt /var/log/gitlab/nginx
root 4374 4333 0 21:57 ? 00:00:00 nginx: master process /opt/gitlab/embedded/sbin/nginx -p /var/opt/gitlab/nginx
gitlab-+ 4381 4374 0 21:57 ? 00:00:00 nginx: worker process
gitlab-+ 4382 4374 0 21:57 ? 00:00:00 nginx: cache manager process
yen 14156 4094 0 23:13 pts/0 00:00:00 grep --color=auto nginx
Check your error log with sudo cat /var/log/nginx/error.log|less
You can also with WinScp by entering the path /var/log/nginx/
In my case had the syntax error.
In my server configuration file I had: server_name {api.mydomain.com};
The correct is: server_name api.mydomain.com;

Resources