Installing MongoDB in Windows xp 64-bit - mongodb

I am trying to install mongoDB in Windows xp 64-bit, while executing mongod.exe in terminal it throws "The procedure entry point InitailizeSRWLock could not be located in the dynamic link library KERNEL32.dll" error, how to resolve this error ?

You'll need either the 32bit or 64bit "legacy" build of MongoDb for older operating systems. The error you're seeing indicates you've tried to execute a build for newer versions of Windows. The function InitializeSRWLock (reference) is only available on Windows 7/2008+.

At first ,make sure the mongodb you downloaded is just the suitable one for you system.
Secondly ,it seems that you system needs the KERNEL32.dll.You'd better download the KERNEL32.dll manually and put it into your c:\Windows\System\ directory.

Related

libtorrent error on Windows XP

I'm trying to run a program on Windows XP using libtorrent 1.1.5 (compiled via boost 1.65.1) and get the error "The entry point to the CreateSemaphoreExW procedure was not found in the KERNEL32.dll DLL.". On Windows 7+ this works fine. How can I fix this error?
UPDATE:
_WIN32_WINNT=0x0501 solved the problem
The answer is simple- you can not fix it. Take a look at the official documentation.
https://msdn.microsoft.com/en-us/library/windows/desktop/ms682446(v=vs.85).aspx
Minimum supported client: Windows Vista. You can try to download a kernel32.dll from windows 7 and put it into the application directory, but I doubt it would work.

QT: driver not loaded, but driver is present

EDIT #2
It works, the first time I installed postgres 64bit, while Qt uses MinGW 32 bit.
EDIT
Following the answer linked by zapredelom, I installed postgres 9 and added to PATH the bin and lib directories. To be sure, I also restarted the machine, but nothing changed. QT_DEBUG_PLUGINS=1 gives me no additional debug infos.
I get this error at runtime:
QSqlDatabase: QPSQL driver not loaded
QSqlDatabase: available drivers: QSQLITE QMYSQL QMYSQL3 QODBC QODBC3 QPSQL QPSQL7
As the error itself displays, postgres driver is already present. Indeed there's a qsqlpsql.dll and qsqlpsqld.dll under C:\Qt\5.8\mingw53_32\plugins\sqldrivers.
I have not built it and I have no Postgres installation on this machine (I test on my Linux OS and deploy on Windows 8.1 VM), the driver was already present after installing QT.
What's the problem?
The driver does not work because it does not find the dependency (it should be depends on libpq.dll), and when you run it, the plugin can not find the required dll. If you are using windows, just try to check using dependencywalker of the qsqlpsql.dll.
You can directly put your libpq.dll to your application exe folder.

postgres odbc connection fails

I am trying to set up a new postgres odbc connection for an application.
This is done on 32-bit Windows 7 system. I installed latest postgresql 9.6 & psqlodbc 0905, and there were no errors. When I add the odbc connection string and test connectivity with postgres login, it fails with the following error:
Test connection failed because of an error in initialized provider.
Specified driver could not be loaded due to system error 182:
(PostgreSQL UNICODE, C:\Program
Files\psqlODBC\0905\bin\psqlodbc35w.dll)
Here's the connection string:
Driver={PostgreSQL
UNICODE};Server=127.0.0.1;Port=5432;Database=postgres;
Uid=postgres;Pwd=postgres;
I then installed Visual C++ redistributable packager versions 2008 and 2010 later. Rebooted the box. Still same issue.
Postgres + odbc + other installs were complete and without any errors.
This is getting too frustrating.
Please.. any ideas on how to fix this will be helpful.?!
Update: I have tested the following:
1. Installed older postgres & psdqlodbc version
2. Added psqlodbc path to PATH env variable at the start
3. Uninstalled standalone psqlodbc installs, and installed Stackbuilder from postgresql package to download and install psqlodbc component.
All of these have not not been any useful.
Final Update: I was able to fix this by using psqlodbc_09_03_0400. For whatever reason, other versions kept throwing error.
Apparently, according to the Microsoft index of error codes, error 182 means ERROR_INVALID_ORDINAL, which with the help of this answer I believe means that the postgresql ODBC driver is loading another DLL and trying to call a function within it that does not exist.
The most likely cause for this would be that the system is loading a wrong version of a DLL on which psqlodbc depends. In fact I found this thread where someone else was having the same issue (although back in 2005).
This could happen if you had installed some other package containing one of the DLLs that psqlodbc relies on, or maybe even another version of psqlodbc.
Try changing the windows search path to put the directory containing the psqlodbc drivers at the front to confirm if this is the case. If that works you might want to try to narrow the problem down until you can find exactly what DLL is conflicting, and if possible remove it.
It is also possible that there is some packaging issue with the psqlodbc package you are using - if that is the case you could try uninstalling that one and installing an earlier version.
Final Update: I was able to fix this by using psqlodbc_09_03_0400. For whatever reason, other versions kept throwing error.

pgAdmin 4 not starting on Windows 10 64bit

After a fresh install of postgres 9.6.0.1 for Windows 10 64bit I am not able to get pgAdmin 4 starting.
First it throws an fatal error message:
After OK, that message appears:
Is there anything wrong? because after OK - the program won't start.
What can I do to get pgadmin 4 running? What should I enter in Python Path and what in Application Path?
I have found now the problem, it was the Java installation on which pgadmin 4 depend heavily.
In Windows when installing Java 8 (Java SE in this case) you do not have to use JAVA_HOME and JAVA_JRE anylonger and you can install java with default path settings (with the version number)
So I installed JAVA SDK 8 32 and 64bit and pgadmin start up normally.
The PATH variable includes only C:\ProgramData\Oracle\Java\javapath, thats all and let you use allways the latest version of java you installed.
In my case, I installed pgAdmin 4 v4.25 (released Aug. 20, 2020) . It solved my issue .
I had the same problem. I think, the installation of Visual C++ 2013 Redistributable is the source.
I fixed it uninstalling pgAdmin 4 and installing it again.
It tried to install Visual C++ 2013 Redistributable again, but it was already installed and now it works.
Hope this helps.
Try to install pgamin 4.5.1, it works for me (w10 x64) pgadmin 4.1.5
After struggling for weeks with this problem I found a solution. In my case I have Anaconda installed and maybe it affects PgAdmin in some way, I don't know. In order to start PgAdmin I followed these steps:
Open cmd and move to C:\Program Files\PostgreSQL\11\pgAdmin 4\web
Run pgAdmin4.py with your Python distribution. I had to install several libraries.
In my case, an error appeared, I needed to change Line #32 of C:\Program Files\PostgreSQL\11\pgAdmin 4\web\pgadmin\browser\__init__.py. More precisely:
from flask_security.views import _security, _commit, default_render_json, _ctx to
from flask_security.views import _security, _commit, _render_json, _ctx
Last, I needed to edited line socket module from Python libraries, gethostbyaddr(name) found non-ASCII symbols in the host name of my computer, I don't have any of them :S. Well, I changed line #687
hostname, aliases, ipaddrs = gethostbyaddr(name) to
hostname, aliases, ipaddrs = gethostbyaddr("")
After all of these steps I run pgAdmin4.py again and it worked.
Hope it helps.
For me there was no way to make it work (pgAdmin4 Version 4.21 that comes with Postgres 11.8 on Windows 10 x64). I really tried every possible solution.
So I gave up and found pgAdmin3 Redux: https://tokavuh.com/pgAdmin3Redux/ that supports Postgres 11, too.
You will probably have problems starting it, because of missing dll's from some Visual C++ Redistributable version I could not find out, but fortunately you will find these missing dll's on https://www.dll-files.com, just search them there as errors pops up.

How can I install MongoDB 3.X on Windows without admin rights?

I'm on a Windows 7 (64-bit) box and do not have admin rights.
It appears from the MongoDB download page (see http://docs.mongodb.org/manual/tutorial/install-mongodb-on-windows/) that the latest version only an MSI install is available (no zip version).
I tried running the 3.0.4 MSI. I clicked custom so I could change the directory to install to. I used %USERPROFILE%\MyProgs\MongoDB-3.0.4, so no admin rights would be needed. It ran for a bit but then prompted me to enter admin credentials. I hit escape (like clicking on X at top right) to close the window. On other MSI installs this has worked. I tried it again and clicked "No" but in both cases received the message
MongoDB 3.0.4 2008R2Plus SSL (64 bit) setup was interrupted.
Your system has not been modified. [...]
This article does a GREAT job going through how to install MongoDB on Windows:
How to install mongoDB on windows?
My observation is that v2.4.14 is the last version that is available via the ZIP format. So for now, I'm using that version.
Is there any other way to install the MongoDB version 3.X MSI without admin rights?
NOTE: On the MongoDB Download page https://www.mongodb.org/downloads there is a link titled View Build Archive (it sends you here https://www.mongodb.org/dl/win32/x86_64-2008plus-ssl, and that site lists *.zip formatted files). I thought I had found my own solution to the question, but when I unzipped the files, and added the "bin" to my path and ran the programs (mongo, and mongod) I received an Windows Dialog that says:
mongod.exe - System Error
The program can't start because LIBEAY32.dll is missing from your
computer. Try reinstalling the program to fix the problem
I stopped here and posted this question. Thanks for any help.
For now I'm using the version that supported the zip format (v2.4.14) and that version does work.
NOTE2: The v2.4.14 zip formatted install doesn't have a file named LIBEAY32.dll), or I might have tried using that file with the newer version.
Yes, it is possible to install the latest MSI (including the one with SSL) without admin rights via command line.
msiexec /a mongodb-win32-x64-3.2.5.msi /qb TARGETDIR="C:\MongoDB"
This will copy the binaries into C:\MongoDB\MongoDB\Server\3.2\bin
I dislike long paths like that, so I create a symlink inside the folder:
cd C:\MongoDB
mklink /j bin C:\MongoDB\MongoDB\Server\3.2\bin
That will create a soft link as C:\MongoDB\bin (which you can add to your PATH environment variable).
mongo --version
mongod --version
Both should return version 3.2.5.
You can do this with most packages, we have to do similar with Python 2.7 and Node 4.4.3 MSI packages on work computers that do not have admin rights.
You can download the "legacy" version which is the unsigned non msi version as a zip. The disclaimer is listed as
The 64-bit legacy build does not include SSL encryption and lacks
newer features of Windows that enhance performance. Use this build for
Windows Server 2003, 2008, or Windows Vista
The 3.0.5 version is https://fastdl.mongodb.org/win32/mongodb-win32-x86_64-3.0.5.zip
The latest version is available as zip download.
[https://www.mongodb.com/dr/fastdl.mongodb.org/win32/mongodb-win32-x86_64-2008plus-ssl-4.0.6.zip/download][1]
Download and Unzip into folder where user has permissions e.g c:\users\xxx\mongodb.
Enter the path to bin folder (e..g c:\users\xxx\mongodb\bin) into the
environment variable 'PATH'. To access path variable press Win + R
and then enter rundll32 sysdm.cpl,EditEnvironmentVariables.
Select Path and click edit. Then enter new and there enter the path
to bin folder. Click OK and OK to save and exit.
Check Mongo version from command line using command mongo --version.
Note: Don't forget to create db folder in C drive that is required for mongo to work locally. All set.