Installing mongodb-enterprise-server error - database

Hello guys. Can someone help me about this one? I cant install mongodb because of dependency problem. I already tried updating my linux mint terminal.
dpkg: dependency problems prevent configuration of mongodb-enterprise-server:
mongodb-enterprise-server depends on libcurl3 (>= 7.16.2); however:
Package libcurl3 is not installed.
mongodb-enterprise-server depends on snmp; however:
Package snmp is not installed.

Installing via dpkg -i mongodb.deb will not include additional package dependencies. You should be able to fix your installation by following up with sudo apt --fix-broken install.
Unless you have strong reasons to avoid the standard process I would recommend following the tutorial to Install MongoDB Enterprise by adding the appropriate repo definitions. Adding the normal package repo will also make it easier for you to update to newer minor releases of MongoDB 4.0.x.

Related

Glitches installing wxpython?

Im relatively new to python world.
Im trying to install wxpython on several computers and it keeps failing.
I use anaconda version 4.9.2 and use the prompt command:
conda install -c anaconda wxpython
I get the following error message:
Collecting package metadata (current_repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Solving environment: failed with repodata from current_repodata.json, will retry with next repodata source.
I try updating python to latest version. I try a number of things. and still I get this pesky problem. What am I doing wrong?
Thanks!
Nothing wrong per se. Those messages are indicating that Conda can't install that package without changing the currently installed packages. Because the Anaconda distribution (!= Conda) has lots of packages this happens very frequently. Also, this particular package is not updated frequently and the anaconda channel doesn't even seem to keep pace with that.
In general, it is better practice is to create new environments for each project/task you have to work on, and only install the packages you require. Also, the conda-forge channel tends to be a more consistent provider for packages, but undergoes less interoperability testing and tuning than the Anaconda channel packages. That is, consider trying something like
conda create -n myenv -c conda-forge python=3.9 wxpython ...
where myenv is whatever you would like to refer to the environment as, and ... should be whatever other packages you know you would like to use.

I screwed up my Steam installation, how do I fix my broken packages?

I have Ubuntu 18.04, not installed directly but upgraded from 16.10, I haven't used Steam in a while on this computer (maybe since before the 18.04 upgrade, don't remember) which led to problems, and after a while of trawling the Internet for possible solutions, I had to admit defeat.
I tried the sudo apt-get autoremove/update/upgrade/dist-upgrade series, and it didn't do anything.
EDIT: I have also done sudo apt-get clean, and sudo apt-get install -f.
I also tried a full uninstall via deleting .steam/ and .local/share/Steam/ .
I am aware of the method of simply manually installing the packages, but that isn't working for me, either. Observe:
$ sudo apt install steam
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
steam:i386 : Depends: libgl1-mesa-dri:i386 (>= 17.3) but it is not going to be installed or
libtxc-dxtn0:i386
Depends: libgl1-mesa-dri:i386 but it is not going to be installed
Depends: libgl1-mesa-glx:i386 but it is not going to be installed
Recommends: nvidia-driver-libs-i386:i386 but it is not installable
E: Unable to correct problems, you have held broken packages.
From this, I tried to run the following commands:
$ sudo apt install libgl1-mesa-dri:i386
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
libgl1-mesa-dri:i386 : Depends: libllvm8:i386 (>= 1:8~svn298832-1~) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
$ sudo apt install libgl1-mesa-dri:i386 libllvm8:i386
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
libllvm8:i386 : Depends: libatomic1:i386 (>= 4.8) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
$ sudo apt install libgl1-mesa-dri:i386 libllvm8:i386 libatomic1:i386
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
debhelper : Depends: dh-autoreconf (>= 17~) but it is not going to be installed
libatomic1:i386 : Depends: gcc-8-base:i386 (= 8.3.0-6ubuntu1~18.04.1) but 8.3.0-16ubuntu3~16.04 is to be installed
E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.
At this point, I don't really know what to do. Especially in response to the line "but 8.3.0-16ubuntu3~16.04 is to be installed". I have Ubuntu 18.04. Why is something from 16.04 going to be installed?
One more try for completion's sake:
$ sudo apt install libgl1-mesa-dri:i386 libllvm8:i386 libatomic1:i386 dh-autoreconf gcc-8-base:i386
Reading package lists... Done
Building dependency tree
Reading state information... Done
gcc-8-base:i386 is already the newest version (8.3.0-16ubuntu3~16.04).
gcc-8-base:i386 set to manually installed.
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
dh-autoreconf : Depends: libtool (>= 2.4.2) but it is not going to be installed
libatomic1:i386 : Depends: gcc-8-base:i386 (= 8.3.0-6ubuntu1~18.04.1) but 8.3.0-16ubuntu3~16.04 is to be installed
E: Unable to correct problems, you have held broken packages.
And including gcc-8-base:i386 does nothing.
How did I break my install of Ubuntu?
Tried all top Google solutions. None of them worked for me.
Came across this answer that described how we can reset broken packages.
Take a backup of the file /var/lib/dpkg/status first. Then erase all the contents of that file.
Then run sudo apt install steam. It may prompt you if there are files that already exist and will be overwritten. Best that you check for the differences in the file's contents. In my case, I decided to use the one from the package maintainers itself instead of my own.
Steam installed smoothly. Did not get any unmet dependencies error.
When I tried to start steam, I got an error about glxchoosevisual failed. For this, I then had to install libnvidia-gl-450:i386 library. Note that in my case, my nvidia driver version was 450 so used that. You need to use your version here. That's it! Steam then launched fine.
Sharing it here in case it helps somebody.
Check if you have enabled restricted and universe repositories.
You can also run:
This cleans the local repo from packages so they are going to be downloaded again
apt-get clean
This is reinstalling broken packages
apt-get -f install

tcms-api 5.3 package incompatible with Windows

I attempted to upgrade my tcms-api library from 5.0 to 5.3 using:
pip install tcms-api --upgrade
on a Windows 10 machine, I saw a lot of errors when trying to install the dependent package of kerberos. Even though this is old, I saw a similar set of errors. The package installation failed since the kerberos package isn't supported on Windows and I was left at tcms-api 5.0.
Please file a bug against https://github.com/kiwitcms/tcms-api.
We can do a quick fix by providing 2 package names:
tcms-api and tcms-api[kerberos]
The first one will not install the kerberos package.
The proposed workaround makes sense but changing the underlying kerberos implementation needs careful testing which isn't a quick job.
OTOH https://github.com/kiwitcms/python-social-auth-kerberos uses gssapi which seems to be the latest and most actively maintained implementation of Kerberos for Python. There is an open issue to migrate to that in tcms-api so you can contribute if you want.
As a workaround, I was able to do the following (caveat: I haven't extensively tested my installation yet):
Clone the tcms-api repo from GitHub
Edit setup.py to change the install_requires line to use 'kerberos-sspi' rather than 'kerberos'
Install the following pip packages: Setuptools, Wheel, Twine
CD to repo folder and run: python setup.py bdist_wheel
That creates a package under the dist folder
Run pip install dist\tcms_api-5.3-py3-none-any.whl
Celebrate successful package install
The steps were modified from this page.
Update:
I confirmed the things I need the API to do work with my custom package (create and update test runs). However, I'm in a situation where I don't need to specifically harden my Kiwi instance using kerberos authentication.

Install Racket package only if not installed

I can install a Racket package with:
raco pkg install <pkg-name>
If the package is not installed, it installs it. If the package is already installed however, it will complain that the package is already installed. While this is fine, is there a better way to check if a package is installed, and only try to install it if its not already installed?
For context, I want this because I have a (non-package) Racket project that relies on certain packages being installed. I could put them in an info.rkt file, but as far as I can tell, these won't get installed unless I try to install the project as a package, which doesn't make sense for this domain.
So, is there anyway to determine if a Racket package is installed? Additionally, can I use this information to only install a package if its not already installed?
Yes, in fact you can. If you are using a shell program or makefile (basically, using the raco pkg tool from the command line), you can pass it the --skip-installed parameter. This will only try to install the package if its not already installed. So you could do something like this in a mace file:
all: # Replace spaces here with tabs, because make...
raco pkg install --skip-installed <important-pkg>
<rest-of-makefile>
Alternatively, if you are looking for an 'in Racket' solution, you can use the installed-pkg-table function to get a hash table containing all of the installed packages. From there, its easy enough to do a hash-has-key? to see if the package is in the table. From there, you can use pkg-install-command to install the package. Your total code will look something like this:
(unless (hash-has-key? (installed-pkg-table) "<important-pkg>")
(pkg-install-command #:deps 'search-auto i))
I should note that there is a slight chance that the package database will change between searching for the key and installing the package. If that is important to you, check out with-pkg-lock

how to create a debian package using “equivs-build” which can be “upgraded” if already installed?

I have created a .deb package using equivs-build command and providing necessary control, preinst, postinst, etc. I noticed that version can also be mentioned in control file. Now I want to create a .deb package with updated source code and I want to enable user to upgrade the package if it is already installed (and is of previous version, of course), as I won't be changing conf related files, etc. One way I can think of is to write a shell-script which will first check for installed version, and will take actions accordingly (i.e. if installed, just update the source-code, database-migrations, etc. and if not, install the package using dpkg -i <package-name>). I was wondering if there was a way to achieve using dpkg only (something like dpkg upgrade <package-name>) which will handle installation or up-gradation as required.
That's already how it works.
dpkg -i package_0.123.deb will upgrade if the version of package is less than 0.123, removing the previous version if necessary (there's an option to force a downgrade, too). apt-get install package will install the newest version of package, removing the old one and upgrading to a new one if necessary. apt-get upgrade will upgrade all packages to the newest version.
Basically, just take care to monotonically upgrade the version number each time you publish a new build.
If you didn't specify a version previously, the default will be something simple like 1.0. Just make it bigger than that.

Resources