Attempted to load interface "CommandSubscriber" from namespace "MongoDB\Driver\Monitoring" - mongodb

I have Symfony 5 project and just following the instructions to install the DoctrineMongoDBBundle package, and I'm receiving te following error,
Attempted to load interface "CommandSubscriber" from namespace "MongoDB\Driver\Monitoring".
Did you forget a "use" statement for another namespace?
/vendor/doctrine/mongodb-odm/lib/Doctrine/ODM/MongoDB/APM/CommandLoggerInterface.php (line 9)
I have the following versions of mongodb and doctrine running.
doctrine/mongodb-odm-bundle": 4.1
mongodb/mongodb": 1.6
Also the php driver installed through Pecl (Version 1.7.4)
Anyone got any ideas to what I'm missing?

If it helps anyone in the future, whilst the MongoDB Driver was installed, I needed to restart PHP FPM, that fixed it.

Related

rust-lld: error: unable to find library -lpq

I'm trying to build a simple web app using Yew, Diesel, and Postgres. When I run
wasm-pack build --target web --out-name wasm --out-dir ./static
I get the following error:
*rust-lld: error: unable to find library -lpq*
I'm on macOS Catalina. I installed Postgres through Homebrew. My libpq.dylib file is at /usr/local/lib.
These are the troubleshooting I've tried already:
Added /usr/local/lib to $PATH. My pg_config shows LIBDIR = /usr/local/lib.
Re-installed Postgres
Updated rustc -nightly
Ideas here are not helpful as well: How can I link a Rust Wasm application with libpq via wasm-pack?
Still it is not resolved. I'd be grateful for any suggestions.
Libpq does not support the wasm-web platform as far as I'm aware therefore there is no way to make this work. As already mentioned in the comments you probably want to use diesel in your backend code, not in the frontend.

how to install staza for python 3.7 (this command is returning error (!pip install stanza ))

I am trying to instal stanza for lemmatization purposes using this command: !pip install stanza but it's returning the following error. Please help I am new to python.
Collecting stanza
Using cached stanza-1.1.1-py3-none-any.whl (227 kB)
ERROR: Could not find a version that satisfies the requirement torch>=1.3.0 (from stanza) (from versions: 0.1.2, 0.1.2.post1, 0.1.2.post2)
ERROR: No matching distribution found for torch>=1.3.0 (from stanza)
Same problem. I went to https://pytorch.org/get-started/locally/ and installed the torch, then it was solved.

Haskell and postgresql - build error "The program pg_config is required but it could not be found."

I am currently learning haskell and just tried using postgresql as a database.
I generated my project with stack (stack new <name> -> stack setup -> stack build)
and then all I changed was adding the dependencies needed to persistent and postgresql to the
package.yaml file (under "dependencies:").
These are:
persistent
persistent-postgresql
persistent-template
This however results in a failing build with the following message:
postgresql-libpq > setup.exe: The program 'pg_config' is required but it could not be found.
postgresql-libpq >
-- While building package postgresql-libpq-0.9.4.2 using:
C:\Users\\AppData\Local\Temp\stack14388\postgresql-libpq-0.9.4.2.stack-work\dist\e626a42b\setup\setup --builddir=.stack-work\dist\e626a42b configure --user --package-db=clear --package-db=global --package-db=C:\sr\snapshots\365a3dde\pkgdb --libdir=C:\sr\snapshots\365a3dde\lib --bindir=C:\sr\snapshots\365a3dde\bin --datadir=C:\sr\snapshots\365a3dde\share --libexecdir=C:\sr\snapshots\365a3dde\libexec --sysconfdir=C:\sr\snapshots\365a3dde\etc --docdir=C:\sr\snapshots\365a3dde\doc\postgresql-libpq-0.9.4.2 --htmldir=C:\sr\snapshots\365a3dde\doc\postgresql-libpq-0.9.4.2 --haddockdir=C:\sr\snapshots\365a3dde\doc\postgresql-libpq-0.9.4.2 --dependency=Cabal=Cabal-2.4.1.0-5rQrtDcYhR2LOcYye7obEr --dependency=Win32=Win32-2.6.1.0 --dependency=base=base-4.12.0.0 --dependency=bytestring=bytestring-0.10.8.2 -f-use-pkg-config --extra-include-dirs=C:\Users\\AppData\Local\Programs\stack\x86_64-windows\msys2-20180531\mingw64\include --extra-lib-dirs=C:\Users\\AppData\Local\Programs\stack\x86_64-windows\msys2-20180531\mingw64\lib --extra-lib-dirs=C:\Users\\AppData\Local\Programs\stack\x86_64-windows\msys2-20180531\mingw64\bin --exact-configuration --ghc-option=-fhide-source-paths
Process exited with code: ExitFailure 1
Does anyone know how to resolve this issue and why it even occurs?
Do I have to install postgresql just for being able to run build the project? If so, how would you
do this in production, when the database could basically lie everywhere?
It looks like Haskell is trying to build with the PostgreSQL client shared library libpq.dll and uses pg_config at build time to determine where PostgreSQL is installed and how it was built.
That would mean that you have to install PostgreSQL on the machine where you build Haskell, including the header files, build environment or however it is called by the installer.
For running Haskell you would only need libpq.dll and the dependent shared libraries.
I solved the issue in Ubuntu with the following command:
apt install libpq-dev

'AutoMapper' already has a dependency defined for 'Microsoft.CSharp'

When I am trying to install 'AutoMapper' it gives me an error "'AutoMapper' already has a dependency defined for 'Microsoft.CSharp'" in VS2010.I am trying to install Automapper latest version AutoMapper.6.1.0. I have already tried the following things but it's not worked for me.
1) Updated Nuget Package manager with latest version 2.8.60318.667
2) I have also manually deleted refernece from Automapper nuspec XML file
Please any one suggest me what can be issue for this.
After installing an older version of the Automapper its work for me. try to use Install-Package Automapper -Version 4.0.4 command from package manager console.

How to get Sinatra on stage with XP?

Keen to try Sinatra but I’m using Windows XP and getting error:
“C:/Ruby19/lib/ruby/gems/1.9.1/gems/rack-1.3.5/lib/rack/backports/uri/common_192.rb:53:in `remove_const’: constant URI::WFKV_ not defined (NameError)”
There is a reference to the problem at: https://github.com/rack/rack/pull/247
where Shanev removed the fix but how do I do that??
The problem seems to with ruby 1.9.1 update your ruby version and then check.
Ref:here