Linux Build Package - Configure Script Throws Error, But it's Wrong - linux

Server: SLES v11 sp3
Kernel: 3.0.101-0.47.71-default
Arch: x86_64
So I am trying to build a src package and when I run the "./configure" script it's throwing some errors that required packages are missing. Since it's x86_64 I thought adding "--libdir=/usr/lib64" or "--libdir=/lib64" would help it find the packages it's looking for but I get the same error either way.
The configure Script is failing with this error:
..........
...SNIP...
..........
checking for xgettext... (cached) /usr/bin/xgettext
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for GEDIT... configure: error: Package requirements (
glib-2.0 >= 2.13.0
gio-2.0 >= 2.16.0
gtk+-2.0 >= 2.13.0
gconf-2.0 >= 1.1.11
gtksourceview-2.0 >= 2.5.1
gedit-2.20 >= 2.25.4
) were not met:
No package 'glib-2.0' found
No package 'gio-2.0' found
No package 'gtk+-2.0' found
No package 'gconf-2.0' found
No package 'gtksourceview-2.0' found
No package 'gedit-2.20' found
Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.
Alternatively, you may set the environment variables GEDIT_CFLAGS
and GEDIT_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.
I checked to make sure I actually have these packages and it seems as though I do. So I'm not sure if it's just not finding them or what... And it also seems as though I have versions of those packages >= what they are asking for, so I'm kinda stumped...
My Installed packages are:
# rpm -qa | grep -i glib-2
libglib-2_0-0-2.22.5-0.8.14.1
# rpm -qa | grep -i 'gtk2'
gtk2-32bit-2.18.9-0.35.1
gtk2-2.18.9-0.35.1
gtk2-engines-2.16.1-4.26
gtk2-branding-SLES-for-VMware-11.1-0.5.99
gtk2-engines-32bit-2.16.1-4.26
gtk2-themes-0.1-737.22
gtk2-lang-2.18.9-0.35.1
gtk2-theme-SLES-for-VMware-11.1-0.7.95
# rpm -qa | grep -i 'gio'
libgio-2_0-0-32bit-2.22.5-0.8.14.1
libgio-2_0-0-2.22.5-0.8.14.1
# rpm -qa | grep -i 'gconf2'
gconf2-2.28.0-1.8.1
gconf2-lang-2.28.0-1.8.1
# rpm -qa | grep -i 'gtksource'
gtksourceview-lang-2.8.2-0.1.195
libgtksourceview-2_0-0-2.8.2-0.1.195
python-gtksourceview-2.4.0-1.32
# rpm -qa | grep -i 'gedit'
gedit-2.28.3-0.8.1
gedit-lang-2.28.3-0.8.1
Anyone have any ideas what the issue could be here? I'm not sure what else to try..?
I had also tried installing the RPM based package but get similar errors for missing packages. See RPM Installation error below...
warning: gedit-plugins-2.28.0-2.el6.x86_64.rpm: Header V3 RSA/SHA256 signature: NOKEY, key ID c105b9de
error: Failed dependencies:
GConf2 is needed by gedit-plugins-2.28.0-2.el6.x86_64
pygobject2 is needed by gedit-plugins-2.28.0-2.el6.x86_64
pygtk2 is needed by gedit-plugins-2.28.0-2.el6.x86_64
pygtksourceview is needed by gedit-plugins-2.28.0-2.el6.x86_64
rpmlib(FileDigests) <= 4.6.0-1 is needed by gedit-plugins-2.28.0-2.el6.x86_64
If anyone has ANY thoughts or suggestions please feel free to reply, it would be much very appreciated!
Thanks in Advance,
Matt

Well I was unable to resolve those errors directly with compiling... However, we have another server with the same OS and everything that already had that package installed (which added more to my confusion why it wasn't working) so to just give it a try I copied that server's directory "/usr/lib64/gedit-2/plugins" to the one I was working on and now everything seems to be working just fine. All the plugins were able to be activated and they seem to work.!
The contents of the directory that I copied over were:
/usr/lib64/gedit-2/plugins # ll
total 700
drwxr-xr-x 4 root root 4096 Apr 28 2015 advancedfind
-rwxr-xr-x 1 root root 216 Apr 28 2015 advancedfind.gedit-plugin
-rw-r--r-- 1 root root 9856 Nov 13 2012 changecase.gedit-plugin
-rw-r--r-- 1 root root 6970 Apr 17 2014 codecomment.gedit-plugin
-rw-r--r-- 1 root root 9563 Mar 18 2014 codecomment.py
-rw-r--r-- 1 root root 8850 Apr 16 2014 codecomment.pyc
-rw-r--r-- 1 root root 8745 Mar 18 2014 codecomment.pyo
-rw-r--r-- 1 root root 18084 Nov 13 2012 docinfo.gedit-plugin
drwxr-xr-x 2 root root 4096 Jul 2 2013 externaltools
-rw-r--r-- 1 root root 9243 Nov 13 2012 externaltools.gedit-plugin
-rw-r--r-- 1 root root 8579 Nov 13 2012 filebrowser.gedit-plugin
-rw-r--r-- 1 root root 179 Apr 17 2014 gpdefs.py
-rw-r--r-- 1 root root 317 Apr 17 2014 gpdefs.pyc
-rw-r--r-- 1 root root 315 Apr 17 2014 gpdefs.pyo
-rw-r--r-- 1 root root 9654 Nov 13 2012 indent.gedit-plugin
-rwxr-xr-x 1 root root 18936 Nov 13 2012 libchangecase.so
-rwxr-xr-x 1 root root 19032 Nov 13 2012 libdocinfo.so
-rwxr-xr-x 1 root root 170256 Nov 13 2012 libfilebrowser.so
-rwxr-xr-x 1 root root 14816 Nov 13 2012 libindent.so
-rwxr-xr-x 1 root root 27320 Nov 13 2012 libmodelines.so
-rwxr-xr-x 1 root root 23248 Nov 13 2012 libsort.so
-rwxr-xr-x 1 root root 82168 Nov 13 2012 libspell.so
-rwxr-xr-x 1 root root 36104 Nov 13 2012 libtaglist.so
-rwxr-xr-x 1 root root 35840 Nov 13 2012 libtime.so
-rw-r--r-- 1 root root 9177 Nov 13 2012 modelines.gedit-plugin
drwxr-xr-x 2 root root 4096 Jul 2 2013 pythonconsole
-rw-r--r-- 1 root root 8602 Nov 13 2012 pythonconsole.gedit-plugin
drwxr-xr-x 2 root root 4096 Jul 2 2013 quickopen
-rw-r--r-- 1 root root 5719 Nov 13 2012 quickopen.gedit-plugin
drwxr-xr-x 2 root root 4096 Mar 20 2015 sessionsaver
-rw-r--r-- 1 root root 6035 Mar 20 2015 sessionsaver.gedit-plugin
drwxr-xr-x 2 root root 4096 Jul 2 2013 snippets
-rw-r--r-- 1 root root 8805 Nov 13 2012 snippets.gedit-plugin
-rw-r--r-- 1 root root 9235 Nov 13 2012 sort.gedit-plugin
-rw-r--r-- 1 root root 9416 Nov 13 2012 spell.gedit-plugin
-rw-r--r-- 1 root root 16794 Nov 13 2012 taglist.gedit-plugin
-rw-r--r-- 1 root root 11861 Nov 13 2012 time.gedit-plugin
And since all these plugins seem to be working without any issuse I guess the configure script was wrong about the missing requirements as I had thought...
Thanks anyways....!

Related

PostgreSQL create extension mongo_fdw

I want to connect a PostgreSQL database with a MongoDB by using Mongo_fdw. After following this instruction to install mongo_fdw with the autogen.sh script on Ubuntu 22.04 LTS, I wanted to check the connection and ran CREATE EXTENSION mongo_fdw; in my database, but the following error occured:
ERROR: could not access file "$libdir/mongo_fdw": No such file or directory
Searchig for a solution I found this page on GitHub, where the same error is discussed. Following the recommendations there, I checked pg_config --version, pg_config --libdir and pg_config --sharedir with the following results:
$ pg_config --version
PostgreSQL 12.9
$ pg_config --libdir
/home/qgis/anaconda3/lib
$ pg_config --sharedir
/home/qgis/anaconda3/share
When I check /home/qgis/anaconda3/share/extension I get the following files:
drwxrwxr-x 2 qgis qgis 4096 Feb 1 10:58 ./
drwxrwxr-x 32 qgis qgis 4096 Jan 18 10:28 ../
-rw-r--r-- 1 root root 157 Feb 1 10:58 mongo_fdw--1.0--1.1.sql
-rw-r--r-- 1 root root 593 Feb 1 10:58 mongo_fdw--1.0.sql
-rw-r--r-- 1 root root 709 Feb 1 10:58 mongo_fdw--1.1.sql
-rw-r--r-- 1 root root 274 Feb 1 10:58 mongo_fdw.control
-rw-rw-r-- 2 qgis qgis 310 Jun 24 2022 plpgsql--1.0.sql
-rw-rw-r-- 2 qgis qgis 179 Jun 24 2022 plpgsql.control
-rw-rw-r-- 2 qgis qgis 370 Jun 24 2022 plpgsql--unpackaged--1.0.sql
I also ran ldconfig as it is recommended on the GitHub page but with no results.
Does someone has an idea how to solve this error?
Thanks in advance!
You have to specify the correct pg_config when building the software, probably
make PG_CONFIG=/usr/lib/postgresql/14/bin/pg_config
That file should exist if you installed the package with the C headers, which is typically called "devel" or "dev" or similar.

'uvloop' has no attribute 'EventLoopPolicy'

I am testing python code performance with uvloop. I am getting 'uvloop' has no attribute 'EventLoopPolicy' error.
I am using python 3.7 and
uvloop 0.13.0
pycharm
I tried changing interpreter reinstalling uvloop but none of them did not work.
Can anyone suggest what is the problem?
Rename your own file to something else than uvloop.py, such as test_uvloop.py.
You're confusing Python's import machinery by having your own file the same name as the library you're trying to use.
I see that you're on a Mac, but I just fixed this problem on my CentOS7.x server by properly setting permissions to the uvloop Python package. It's pesky because (at least on CentOS) some pip-installed Python packages go in /usr/local/lib/python3.7/site-packages and some go in /usr/local/lib64/python3.7/site-packages.
Check out what the files in my lib64 directory looked like before I fixed it:
me#myserver /usr/local/lib64/python3.7/site-packages
$ ll
total 16
drwxr-xr-x. 3 root root 4096 Jan 17 15:38 click
drwxr-xr-x. 2 root root 134 Jan 17 15:38 Click-7.0.dist-info
drwxr-x---. 4 root root 74 Jan 17 15:42 httptools
drwxr-x---. 2 root root 141 Jan 17 15:42 httptools-0.0.13-py3.6.egg-info
drwxr-x---. 3 root root 4096 Jan 17 15:43 pydantic
drwxr-x---. 2 root root 111 Jan 17 15:43 pydantic-1.3.dist-info
drwxr-x---. 5 root root 4096 Jan 17 15:43 uvloop
drwxr-x---. 2 root root 141 Jan 17 15:43 uvloop-0.14.0-py3.6.egg-info
drwxr-xr-x. 4 root root 4096 Jan 17 15:38 websockets
drwxr-xr-x. 2 root root 134 Jan 17 15:38 websockets-8.1.dist-info
Unless I was running as a root user the uvloop files are untouchable and that's what caused the error. On your Mac, try to find where your uvloop package is installed and make sure your script can access it.

How to update homebrew in preparation for installing node/npm on macOS Mojave

I attempted to install node.js/npm onto a macbook running Mojave 10.14.5 so that I can do local development of a web app. From internet research my understanding is the first step is updating homebrew in preparation for installation but I got the error "Error: /usr/local must be writable!" when I ran:
brew update
I searched the internet and other people appeared to have the command below fix the problem, but for me that didn't work and I still got the error.
sudo chown -R $(whoami) $(brew --prefix)/*
Can anyone offer any advice as to what I can do so that I can update brew and install node.js/npm? Is the brew update required or should I just skip that step?
Below is the output from brew --prefix that may help...
MacBook-Pro:usr dannyboy$ ls -l $(brew --prefix)
total 215896
-rw-r--r-- 1 dannyboy admin 3161 May 23 2016 CODEOFCONDUCT.md
drwxr-xr-x 5 dannyboy admin 160 Nov 4 2018 Cellar
-rw-r--r-- 1 dannyboy admin 1241 Jan 13 2016 LICENSE.txt
drwxr-xr-x 11 dannyboy admin 352 Nov 4 2018 Library
-rw-r--r-- 1 dannyboy admin 3918 May 23 2016 README.md
drwxrwxr-x 33 dannyboy admin 1056 Nov 4 2018 bin
drwxr-xr-x 3 dannyboy admin 96 Nov 4 2018 etc
lrwxr-xr-x 1 dannyboy admin 27 May 22 2016 hadoop -> /usr/local/hadoop-2.7.2-src
drwxr-xr-x# 22 dannyboy staff 704 Nov 4 2018 hadoop-2.7.2-src
-rw-r--r--# 1 dannyboy staff 110520320 May 22 2016 hadoop-2.7.2-src.tar
drwxrwxr-x 30 dannyboy admin 960 Nov 4 2018 include
drwxrwxr-x 23 dannyboy admin 736 Nov 4 2018 lib
drwxr-xr-x 5 dannyboy wheel 160 Nov 4 2018 man
lrwxr-xr-x 1 dannyboy wheel 27 Jan 18 2014 mysql -> mysql-5.6.15-osx10.7-x86_64
drwxr-xr-x 18 dannyboy wheel 576 Nov 4 2018 mysql-5.6.15-osx10.7-x86_64
-rw-r--r-- 1 dannyboy owner 1536 Jan 18 2014 mysql_db_backup_20140118.libertyrocks.tar
drwxr-xr-x 5 dannyboy admin 160 Nov 4 2018 opt
drwxr-xr-x 3 dannyboy wheel 96 Nov 4 2018 remotedesktop
drwxrwxr-x 9 dannyboy admin 288 Nov 4 2018 share
Also requested...
MacBook-Pro:usr dannyboy$ ls -l /usr
total 0
drwxr-xr-x 971 root wheel 31072 May 15 01:37 bin
drwxr-xr-x 307 root wheel 9824 May 15 01:37 lib
drwxr-xr-x 250 root wheel 8000 May 15 01:37 libexec
drwxr-xr-x 27 root wheel 864 Nov 4 2018 local
drwxr-xr-x 239 root wheel 7648 May 15 01:37 sbin
drwxr-xr-x 46 root wheel 1472 Nov 4 2018 share
drwxr-xr-x 5 root wheel 160 Sep 21 2018 standalone

Which certificate from Let's Encrypt does a website use for HTTPS?

I have a website that was set up to use https using a certificate from Let's Encrypt. I am trying to add that certificate to a keystore to use https with a dropwizzard API. The problem I am having is that there are multiple certificates.
My question is how can I figure out which of the certificates my website uses so that I could use that for the API as well?
In /etc/ssl/certs this is what shows up:
lrwxrwxrwx 1 root root 49 Nov 20 2017 ca-bundle.crt -> /etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem
-rw-r--r-- 1 root root 885625 Apr 12 00:27 ca-bundle.crt.rpmnew
lrwxrwxrwx 1 root root 55 Nov 20 2017 ca-bundle.trust.crt -> /etc/pki/ca-trust/extracted/openssl/ca-bundle.trust.crt
-rw-r--r-- 1 root root 1059673 Apr 12 00:27 ca-bundle.trust.crt.rpmnew
-rw------- 1 root root 1586 Dec 15 2017 localhost.crt
-rwxr-xr-x 1 root root 610 Aug 17 17:16 make-dummy-cert
-rw-r--r-- 1 root root 2516 Aug 17 17:16 Makefile
-rwxr-xr-x 1 root root 829 Aug 17 17:16 renew-dummy-cert
After looking more closely at the config files like Patrick had suggested I found the config file in /etc/httpd/conf.d/ssl.conf that had the path to where the certificate and private key were.
You can have a look at your vhost file to see the path to the physical ssl cert files being used by the website. The vhost is likely going to be at /etc/apache2/sites-available/ .

Mongodb service fails after reboot

I am trying to setup a replicaset for my dev environment, and have three machines running debian 9.3 stretch with a mongod service. The replicaset is working, and all seems okay.
But when I reboot one of the servers the mongod service doesn't come up. When I check the status it says it failed status=48
mongod.service - MongoDB Database Server
Loaded: loaded (/lib/systemd/system/mongod.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Tue 2018-08-28 22:17:37 CEST; 10s ago
Docs: https://docs.mongodb.org/manual
Process: 392 ExecStart=/usr/bin/mongod --config /etc/mongod.conf (code=exited, status=48)
Main PID: 392 (code=exited, status=48)
CPU: 33ms
aug 28 22:17:37 staging-manager-1 systemd[1]: Started MongoDB Database Server.
aug 28 22:17:37 staging-manager-1 mongod[392]: 2018-08-28T22:17:37.389+0200 I CONTROL [main] Automatically disabling TLS 1.0, to fo
aug 28 22:17:37 staging-manager-1 systemd[1]: mongod.service: Main process exited, code=exited, status=48/n/a
aug 28 22:17:37 staging-manager-1 systemd[1]: mongod.service: Unit entered failed state.
aug 28 22:17:37 staging-manager-1 systemd[1]: mongod.service: Failed with result 'exit-code'.
I already enabled the service with systemctl enable mongod and in the status I can see that it is indeed enabled, but why does it fail after I reboot the machine?
update:
root#machine:/home/<user># journalctl -u mongod
-- Logs begin at Thu 2018-08-30 21:11:33 CEST, end at Thu 2018-08-30 21:26:42 CEST. --
aug 30 21:11:33 staging-manager-1 systemd[1]: Started MongoDB Database Server.
aug 30 21:11:33 staging-manager-1 mongod[398]: 2018-08-30T21:11:33.388+0200 I CONTROL [main] Automatically disabling TLS 1.0, to force-enable TLS 1.0 specify --sslDisabledProtocols 'none'
aug 30 21:11:33 staging-manager-1 systemd[1]: mongod.service: Main process exited, code=exited, status=48/n/a
aug 30 21:11:33 staging-manager-1 systemd[1]: mongod.service: Unit entered failed state.
aug 30 21:11:33 staging-manager-1 systemd[1]: mongod.service: Failed with result 'exit-code'.
root#machine:/home/<user># ll /etc/init
total 48
-rw-r--r-- 1 root root 278 mei 29 2017 anacron.conf
-rw-r--r-- 1 root root 1875 jul 18 21:01 docker.conf
-rw-r--r-- 1 root root 2493 jun 2 2015 networking.conf
-rw-r--r-- 1 root root 933 jun 2 2015 network-interface.conf
-rw-r--r-- 1 root root 530 jun 2 2015 network-interface-container.conf
-rw-r--r-- 1 root root 1756 jun 2 2015 network-interface-security.conf
-rw-r--r-- 1 root root 1359 mrt 14 2017 sddm.conf
-rw-r--r-- 1 root root 637 mrt 1 13:36 ssh.conf
-rw-r--r-- 1 root root 337 jun 13 22:20 udev.conf
-rw-r--r-- 1 root root 360 jun 13 22:20 udevmonitor.conf
-rw-r--r-- 1 root root 352 jun 13 22:20 udevtrigger.conf
-rw-r--r-- 1 root root 138 jan 23 2017 usb-modeswitch-upstart.conf
root#machine:/home/<user># ll /etc/init.d
total 168
-rwxr-xr-x 1 root root 5336 feb 1 2016 alsa-utils
-rwxr-xr-x 1 root root 2014 mei 29 2017 anacron
-rwxr-xr-x 1 root root 8181 apr 5 20:32 apache2
-rwxr-xr-x 1 root root 2489 mei 13 18:52 apache-htcacheclean
-rwxr-xr-x 1 root root 2401 jan 23 2017 avahi-daemon
-rwxr-xr-x 1 root root 2948 sep 13 2017 bluetooth
-rwxr-xr-x 1 root root 1904 nov 18 2015 cgroupfs-mount
-rwxr-xr-x 1 root root 1232 apr 7 2017 console-setup.sh
-rwxr-xr-x 1 root root 3049 okt 7 2017 cron
-rwxr-xr-x 1 root root 2816 jul 10 15:57 cups
-rwxr-xr-x 1 root root 1961 jan 19 2017 cups-browsed
-rwxr-xr-x 1 root root 2813 mrt 2 09:59 dbus
-rwxr-xr-x 1 root root 3843 jul 18 21:01 docker
-rwxr-x--- 1 root root 4285 jul 20 07:27 elasticsearch
-rwxr-xr-x 1 root root 3033 aug 9 21:30 gdm3
-rwxr-xr-x 1 root root 1604 feb 2 2017 gdomap
-rwxr-xr-x 1 root root 3809 mrt 7 19:29 hwclock.sh
-rwxr-xr-x 1 root root 1479 mei 19 2016 keyboard-setup.sh
-rwxr-xr-x 1 root root 2044 dec 26 2016 kmod
-rwxr-xr-x 1 root root 2241 apr 26 2017 minissdpd
-rwxr-xr-x 1 root root 4597 sep 16 2016 networking
-rwxr-xr-x 1 root root 1757 mrt 18 2017 network-manager
-rwxr-xr-x 1 root root 612 dec 4 2015 pppd-dns
-rwxr-xr-x 1 root root 1191 mei 17 12:56 procps
-rwxr-xr-x 1 root root 4355 dec 10 2017 rsync
-rwxr-xr-x 1 root root 2868 jan 18 2017 rsyslog
-rwxr-xr-x 1 root root 2330 mei 21 2017 saned
-rwxr-xr-x 1 root root 1222 apr 3 2017 screen-cleanup
-rwxr-xr-x 1 root root 1808 mrt 14 2017 sddm
-rwxr-xr-x 1 root root 2117 aug 2 2017 speech-dispatcher
-rwxr-xr-x 1 root root 2484 okt 12 2016 spice-vdagent
-rwxr-xr-x 1 root root 4033 mrt 1 13:36 ssh
-rwxr-xr-x 1 root root 731 jun 5 2017 sudo
-rwxr-xr-x 1 root root 6087 jun 13 22:20 udev
-rwxr-xr-x 1 root root 1391 mei 6 2017 unattended-upgrades
-rwxr-xr-x 1 root root 2757 nov 23 2016 x11-common
That is the whole output message?
Check if the default mongod port(27017) is not in use.
netstat -a
Or try starting in a different port
mongod --fork --port 8000
MongoDB defines exit code 48 as: "A newly started mongod or mongos could not start listening for incoming connections, due to an error."
You have pasted just the status output for the MongoDB service. For the full logs of a service on a systemd based system, you should review the systemd journal output:
journalctl -u mongod
As Lucca suggested, the problem may be something else is already running on the port when you are trying to start.
Check that you are't also trying to start MongoDB via Upstart or SysVInit by looking for MongoDB files in /etc/init and /etc/init.d. If any are found, move them somewhere else so that only the systemd service file is being used to start the service.
a#a-57:~$ sudo systemctl stop mongod.service
a#a-57:~$ sudo systemctl start mongod.service
a#a-57:~$ sudo systemctl status mongod.service
● mongod.service - MongoDB Database Server
Loaded: loaded (/lib/systemd/system/mongod.service; enabled; vendor preset: enabled)
Active: active (running) since Mon 2021-08-09 16:38:29 CST; 6s ago
Docs: https://docs.mongodb.org/manual
Main PID: 2205 (mongod)
CGroup: /system.slice/mongod.service
└─2205 /usr/bin/mongod --config /etc/mongod.conf
八 09 16:38:29 a-57 systemd[1]: Started MongoDB Database Server.
Somehow it's dangerous to edit the rc files under /etc in these modern days. And people would prefer to use system command API as we knew.
You need to edit etc/rc.local in order for it to start on boot up
Just add service mongod start to end of the rc.local file

Resources