Install GeoIP Nginx module - Debian - nginx

I'm seeking your help to install the Nginx GeoIP module, and all its dependencies.
Actually, i tried a lot if things to build Nginx with it, but failed each time on same error.
My config:
Debian 8.2, Nginx 1.9.7-1~jessie (last mainline), PHP7 RC7.
What i did:
Installed geoip-api-c 1.6.7 from source
Try apt-get install directly geoip-bin package, failed as "already uptodate").
Installed module libmaxminddb from git
A ldconfig -p | grep maxminddb command give me :
libmaxminddb.so.0 (libc6,x86-64) => /usr/local/lib/libmaxminddb.so.0
libmaxminddb.so (libc6,x86-64) => /usr/local/lib/libmaxminddb.so
Everything looks fine.
But on nginx dpkg-buildpackage -b, one libmaxminddb check fail with :
dh_shlibdeps
dpkg-shlibdeps: error: no dependency information found for /usr/local/lib/libmaxminddb.so.0 (used by debian/nginx/usr/sbin/nginx)
Hint: check if the library actually comes from a package.
dh_shlibdeps: dpkg-shlibdeps -Tdebian/nginx.substvars debian/nginx/usr/sbin/nginx returned exit code 2
debian/rules:11: recipe for target 'binary' failed
I really tested everything, installed all lib again from source, tried to install from ubuntu PPA & didnt found any debian repo URL to add to my list.
Just to know, i tried :
apt-get install libmaxminddb0 libmaxminddb-dev mmdb-bin
Fail with packet not found.
Regarding this, i removed geoip --add-module before nginx build and the build-package worked perfectly.
Thanks a lot

You can ignore missing info warnings by using
dh_shlibdeps --dpkg-shlibdeps-params=--ignore-missing-info
This answer https://stackoverflow.com/a/14992359 solved same problem for me

Related

I am not able to install Apache Airflow in Windows

My attempts include:
[ here i have python 3.9 so my constraints is 3.9]
I created a virtual environment and attempted to install Apache-Airflow by using pip install 'apache-airflow==2.5.1' / —constraint "https://raw.githubusercontent.com/apache/airflow/constraints-2.5.1/constraints-3.9.txt," but I received an error that I couldn't understand, so I looked on the stack community for advice and learned that I needed to add -t, which I did.
but then I started getting permission errors, then I went into community posts and how to fix permission errors, and it was suggested that I should run command prompt as administrator and then install unfortunately this thing isn't working for me
I've tried running cmd as administrator, going to my project's directory, activating virtualenv, and installing the library, but I still get the same problem. PermissionError: [WinError 5] Access is denied: 'D:\\'
Thanks in advance.
Try removing the slash (/) from the command before the --constraint and then running inside the cmd terminal; it will work.
pip install apache-airflow==2.5.1 --constraint "https://raw.githubusercontent.com/apache/airflow/constraints-2.5.1/constraints-3.9.txt"
Note : Please be aware that the above recommendation is for Windows, but even if it is successfully installed you won't be able to run airflow because of the files used, such as pwd and others. Therefore, I will recommend that you use airflow in Windows using Ubuntu. You can follow this link to install Ubuntu in your system and set up airflow.
youtube-video-url

Is Passenger Deprecated for Nginx versions above 1.14?

I updated nginx from version 1.14 to 1.18 (Ubuntu) on Ubuntu 18.04.
Doing so appeared to break passenger. So I uninstalled and attempted to reinstall the Open Source Passenger version via the Passenger installation Ubuntu 18.04 instructions.
I got to this line:
sudo apt-get install -y libnginx-mod-http-passenger
Which throws this error
libnginx-mod-http-passenger : Depends: nginx-common (< 1.14.1) but 1.18.0-3ubuntu1+bionic1 is to be installed
Update I also attempted with the enterprise version. Following the enterprise version installation instructions, I received a similar error message:
libnginx-mod-http-passenger-enterprise : Depends: nginx-common (< 1.14.1) but 1.18.0-3ubuntu1+bionic1 is to be installed
I did attempt to research the issue and I found this issue on Phusion's GitHub as well as this more recent issue. It appears that what most people are doing is rolling back their nginx version to 1.14.
It is not deprecated, no. The problem is that the packaged module you are trying to install was made for an older Nginx version that is distributed through the system default repository. This appears in the installation guide that you've mentioned:
At this point we assume that you already have Nginx installed from your system repository.
What this means is that the following instructions assume that you have Nginx specific version (1.14.0 in your case) installed, for which the packaged module was built. This is emphasised in the new passenger documentation:
If you want to use our packaged Nginx module, you must use your distro's provided Nginx package. If for example you have the repo provided by NGINX setup, you will instead need to compile a dynamic module compatible with that Nginx.
The link in the last quote will bring you to the guide on how to compile a dynamic passenger module and enable it in Nginx configuration. I will not repeat the whole process to keep the answer short but the general approach is this:
Get passenger module for Nginx source code.
Get Nginx source code for the version you have installed.
Compile Nginx with the passenger module:
cd /path-to-nginx-source-dir
./configure --prefix=/opt/nginx \
--with-some-configure-flag \
--add-dynamic-module=$(passenger-config --nginx-addon-dir) \
--add-module=/path-to-some-other-nginx-module
make
sudo make install
Make Nginx to load the module by adding this line to nginx.conf:
load_module modules/ngx_http_passenger_module.so;
Personally, I'd rather chosen the 'nginx-behind-nginx' approach than building the module. That is you have Nginx any version you like but it runs as a reverse proxy for another Nginx with passenger enabled (Passenger Standalone). With an unnoticeable penalty to performance this will be much easier to maintain (install, update). See this guide for details.

Centos7: Can't install nginx (or epel)

I have a clean install of Centos 7 on a RaspberryPi3b+. I am trying to install nginx and am running into problems with each approach.
Most of the research I've done points to installing epel, and then installing nginx. When I run yum install epel-release, I get the error:
No package epel-release available.
Error: Nothing to do.
Some searching led me to wget it directly from fedora. I was able do that. I then ran rpm -ivh epel-release-latest-7.noarch.rpm successfully and then tried yum install nginx. That gave me this long error:
One of the configured repositories failed (Unknown),
and yum doesn't have enough cached data to continue. At this point the only
safe thing yum can do is fail. There are a few ways to work "fix" this:
1. Contact the upstream for the repository and get them to fix the problem.
2. Reconfigure the baseurl/etc. for the repository, to point to a working
upstream. This is most often useful if you are using a newer
distribution release than is supported by the repository (and the
packages for the previous distribution release still work).
3. Run the command with the repository temporarily disabled
yum --disablerepo=<repoid> ...
4. Disable the repository permanently, so yum won't use it by default. Yum
will then just ignore the repository until you permanently enable it
again or use --enablerepo for temporary usage:
yum-config-manager --disable <repoid>
or
subscription-manager repos --disable=<repoid>
5. Configure the failing repository to be skipped, if it is unavailable.
Note that yum will try to contact the repo. when it runs most commands,
so will have to try and fail each time (and thus. yum will be be much
slower). If it is a very temporary problem though, this is often a nice
compromise:
yum-config-manager --save --setopt=<repoid>.skip_if_unavailable=true
Cannot retrieve metalink for repository: epel/armhfp. Please verify its path and try again
So, I found another method that doesn't require epel. I created a .repo file for nginx at /etc/yum.repos.d/nginx.repo, and added:
[nginx]
name=nginx repo
baseurl=http://nginx.org/packages/centos/$releasever/$basearch/
gpgcheck=0
enabled=1
I ran yum repolist and got an error:
http://nginx.org/packages/centos/7/armhfp/repodata/repomd.xml: [Errno 14] HTTP Error 404 - Not Found
For laughs, I tried installing nginx anyway and got an error similar to the long one above that the nginx repo failed.
Finally, I tried going to nginx.org and finding the correct link and hard-coding it in the repo file. That didn't work either, and now I am well and truly stuck.

DPDK install using Meson and Ninja

I wanted to try learn things in DPDK in Debian 10 buster VM.
I have taken DPDK 20.08 as source.
I followed steps as mentioned in Compiling the DPDK Target from Source https://doc.dpdk.org/guides/linux_gsg/build_dpdk.html#uncompress-dpdk-and-browse-sources
I have tried to follow the below steps
tar xJf dpdk-<version>.tar.xz
cd dpdk-<version>
meson build
cd build
ninja
ninja install
ldconfig
On the above when I tried
ninja
it works. Then I went for next command
If I try with
sudo ninja install
from dpdk build directory
it says sudo: ninja: command not found
If I try
ninja install with out sudo
it gets terminated with error.
It asks for sudo password then shows
ModuleNotFoundError: No module named mesonbuild
Failed Meson-install
ninja:build stopped:subcommand failed
Would appreciate your help to resolve this step.
Edit
Repeated steps with root account. Problem didn't occur. Initially it was looking in /home/vijay/.local/bin folder. Then I used from /usr/local/bin/meson
The error information ninja: command not found could be 1 of the 2 things
either NINJA utility is not installed
or PATH for NINJA Binary is incorrect
As recommended in the comment, ensure 'ninja' is installed and you have the right path like /usr/bin/ for the same.
[EDIT] #Vijay has updated it is indeed the path related issue.

Symfony Installation gives fatal error

I'm new to the symfony2 and I was following http://symfony.com/doc/current/book/installation.html for installation using Composer now
It gives me a Fatal Error after some time:
monolog/monolog suggests installing rollbar/rollbar (Allow sending log messages to Rollbar)
Writing lock file
Generating autoload files
Fatal error: Call to undefined method Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::defineDirectoryStructure() in /Users/app/SymfonyStandard/RootPackageInstallSubscriber.php on line 28
#hap absolutely right on Debian/Ubuntu
sudo apt-get install php5-curl
is solving this issue. I think on another platform php5-curl will help too.
RESOLVED:
Got the same problem. Deleted the file composer.phar, installed again via curl -s https://getcomposer.org/installer | php - problem persists
/path/to/webroot/project/vendor/sensio/distribution-bundle/Sensio/Bundle/DistributionBundle/ScriptHandler.php file does not have the method defineDirectoryStructure() in it
symfony/framework-standard-edition (v2.6.1)
PHP 5.5.9-1ubuntu4.5 (cli) (built: Oct 29 2014 11:59:10)
problem here
sensio/distribution-bundle (v3.0.11)
Thanks #hap, this helped
sudo apt-get install php5-curl
Just had this problem on Debian. For me the problem was that sensio/distribution-bundle in its last version (v3.0.12, the one introducing the defineDirectoryStructure function) requires the cURL PHP extension, which was not installed, so it installed v3.0.11 (which don't contain the required method).
After installing php5-curl, Composer finaly installed the last version of sensio/distribution-bundle and everything was fine.
Got the same problem too ... Works on a debian distrib, but doesn't work on my wamp on windows 7 !
So tried to update my wamp, to get PHP5.5, reconfigure composer to use this PHP, still didn't work ..
Then I tried to launch the Console in Administrator mode, and launch :
"composer create-project symfony/framework-standard-edition sfproject/"
And guess what .... That finally worked !! With administrator rights ... Just give it a try ;)
I have same problem. I just added in composer.json string "symfony/symfony": "2.3.*", And its working for me.
Also, i deleted my composer.phar and composer.lock files.
The problem, if you have in your project symfony 2.3 it installing dependencies for v 2.7 .
I got this error from a install into a new vagrant VM, it would appear that something done recently has broken this as I managed to install a 2.6.0 version last week whilst testing, now it doesn't work.
After a bit of trial and error, it appears that the 2.6x and 2.5x branches are both affected and will not install, but 2.3x and 2.4x do install without the error.
incase anyone doesn't know how to install a specific version, just add it onto the end of the composer command, i.e.
composer create-project symfony/framework-standard-edition . 2.4.x
VM: Ubuntu 14.01 / PHP 5.5.9
I had the same problem in an Ubuntu 14.04 VM set up with PuPHPet and Vagrant/VirtualBox.
I've noticed that when I had the same problem, the DistributionBundle was severely out of date. Trying to upgrade it manually from composer.json (changing the version to 3.0.12, which was the las one available at the time I had the problem) produced a more verbose error, stating I hadn't installed php5-curl.
After updating the PuPHPet config file to include the cURL module for PHP and reprovisioning my VM, Symfony installed just fine, having installed the last version of Sensio Distribution Bundle, which contained the defineDirectoryStructure() method.

Resources