Mongodb-compass load doesn't work in mogosh? - mongo-shell

Running the load command in the MongoDB Compass mongosh shell (on macOS Version 1.28.1) doesn't work:
\>load("test.js")
MongoshUnimplementedError: [COMMON-90002] load is not currently implemented for this platform
but running help displays load as one of the available commands.
Am I doing something wrong?

Related

How to run a standalone linux app built with flutter?

I have built a linux app with flutter using : flutter build linux in my ubuntu VM.
My goal is to run this linux app in an embbeded device so i need to copy the required files to this device (running under linux) and then execute the equivalent of main.dart in the embbeded device.
I am very new to this, so what are the directories / files needed to run the standalone linux app ?
I see a bundle directory inside the /build/linux/x64 folder after running flutter build linux but i don't understand any files written inside / how to execute the whole app... And even if it's the correct directory to copy in my embbeded device.
EDIT :
Running the app by trying to execute ./my_app_name on the corresponding file gives the following error :
-bash: ./my_app_name: cannot execute binary file: Exec format error
And i am guessing this is a not a shell script...
After running the command flutter build linux, you should find all the required files to run it in build/linux/release/bundle
Just copying/pasting it on your device shall work (if the device is supported).
There is an official guide explaining how to build and release your app onto the Snap Store: https://flutter.dev/docs/deployment/linux
Important note :
As described in the official documentation, a Flutter app supports Linux Debian, 64-bit. Meaning that if you try to run your app on a 32-bit distribution, it won't start.

Are there any way to load another version of `libc` library into a pwntools script?

I'm trying to run an executable using pwntools using a different version of libc than the one I installed locally. Is there any way I can do that?
I tried this way, but it doesn't seem to work.
I will attach a picture with the script and also with what error I got.
io = process(BIN, env={"LD_PRELOAD": "./libc.so.6"})
I am running this on Ubuntu 20.04 using python 3.8.

Error: Could not find or load main class Folder.confluent-5.5.1-2.12.tar.confluent-5.5.1-2.12.confluent-5.5.1.logs

I am using cygwin on window.
and Running follows command on cygwin for starting ksql server.
bash ksql-server-start .properties
Error: Could not find or load main class Folder.confluent-5.5.1-2.12.tar.confluent-5.5.1-2.12.confluent-5.5.1.logs
Thanks.
No Windows compatible scripts are provided with ksqlDB. You may be able to 'fix' the scripts that do come with it to work on windows. Alternatively, you can just run ksqlDB and the CLI in docker, which is the supported routed for Microsoft windows. See the ksqlDB microsite for instructions on how to get something up and running in docker, or the Kafka examples microsite.

PostgreSQL seems to be using an old version after update

I uninstalled my PostgreSQL because I'm trying to use version 9.1.9. I tried reinstalling it. It successfully installed from what I can see.
However, when typing in psql --version on the command line, I get that it is still using version 9.0.10
How can I make it use the new version?
psql is the command line interface and its version can be independent of the Postgres server.
To get the version of the server software run SELECT version() against the database you are connected to (from within psql). Though it is possible to interact with different versions, some obvious limitations apply. I suggest you uninstall the outdated psql as well and use the version matching the server.
If you're running this on a UNIX/Linux system the problem is likely to do with where psql is being called from. It doesn't sound like the old version got removed and you're still calling it when you run psql. Try running this:
which psql
That will tell you the full path of what gets invoked when you run just psql. To see if there are other instances of psql installed on your system try running:
sudo updatedb
(you'll need to put in your password here). And then:
locate psql
Your system likely uses some kind of package manager, which controls which packages are installed. For example, Ubuntu/Debian use dpkg, Redhat uses yum, you may be using something like fink or macports if you are using OSX.

pecl not working on php CLI mode (involving mongoDB in Gearman)

For test purposes I have gearman running on localhost. So I run the gearman worker.php file from php command line. When I test this in normal apache mode, mongoDB works just fine, but when it runs from the gearman worker file I get the error "fatal error: class 'Mongo' not found". Now the Mongo class comes from pecl and the mongo.so extension in php.ini. SO yeah, trying to figure out why a php file run from CLI is different. Does it use a separate php.ini file?
You can check which .ini files are being loaded by the CLI version by doing php --ini. If your PHP was provided by a distro, it's very possible for it to have two seperate .ini sets, one for web-based and one for CLI. You can get the equivalent info from phpinfo() when it's running online as well.
To force it to load a particular .ini, you can use php -c /path/to/file.ini.
Well a simple find / -name php.ini answered that question for me. So yes, there is a separate php.ini file. Where I needed to add the line extension=mongo.so.
It sounds like either you're loading different ini files or you've got multiple instances of php installed on your machine and apache is using a different one. Make the script v.php:
<?php phpinfo();
then try running it from CLI and then viewing it via localhost. EG:
php v.php
and
http://localhost/v.php