I am installing Ubuntu 18.04
I have done this before, and never had this issue, the installation of OPAM has always gone smoothly, except this time.
I run the code to install OPAM.
sudo apt install opam
The installation does not give any errors, everything seems to go normally.
Then I run this.
opam init
and this is my output
Checking for available remotes: rsync and local, git, mercurial, darcs. Perfect!
[WARNING] Recommended dependencies -- most packages rely on these:
- m4
=-=- Fetching repository information =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
[default] synchronized from https://opam.ocaml.org
[ERROR] Base package base-threads of compiler system not found! Ignored.
[ERROR] Base package base-bigarray of compiler system not found! Ignored.
[ERROR] Base package base-unix of compiler system not found! Ignored.
[ERROR] Inconsistent set of base compiler packages: {} needed but not included
/ { base-bigarray, base-threads, base-unix } extra
[ERROR] Initialisation failed
OpamGlobals.Exit(66)
Once this errors out, I am stuck and can not go any further.
As I mentioned at the top, I have installed this version of the server many times in the past, and installed OPAM without an issue, until now.
This is through Virtualbox, so I deleted the installment and reinstalled it again, thinking that maybe there was a bad install. But, I get the same error.
I did some researching through Google, and cannot find this exact issue, but found similar ones with this OPAM build issue.
An update. Performing as suggested by AndreasKralj
opam init --comp $1.2.2
Checking for available remotes: rsync and local, git, mercurial, darcs. Perfect!
[WARNING] Recommended dependencies -- most packages rely on these:
- m4
=-=- Fetching repository information =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
[default] synchronized from https://opam.ocaml.org
Cannot find /home/darkness/.opam/compilers/.2.2/.2.2/.2.2.comp: .2.2 is not a valid compiler name.
[ERROR] Initialisation failed
OpamGlobals.Exit(1)
Any idea's on this one, will be greatly appreciated.
Wayne
To fix this issue, you'll need to do opam init --comp 1.2.2 to ensure ocaml is installed properly and set as the version you want.
Related
I'm trying to install packages with Spack following the instruction on how to install OpenMPI.
When I install packages like xpmem, I get a first error saying ERROR: Kernel configuration is invalid. Later in the output I get compilation errors like error: passing argument 4 of ‘proc_create_data’ from incompatible pointer type.
I already tried to re-install linux-headers as done here. Also I tried to use different versions of the GCC compiler as well as xpmem package and used a clean PATH variable as recommended by Spack. But nothing seems to fix it. Also on another machine it yielded the same error (Both are Ubuntu 20.04.3).
Does anyone have an idea what could be wrong?
As a package manager, spack should install xpmem's dependencies, then try and compile xpmem itself. When encountering build errors, the next step is to try spack cd and running the compile steps manually.
I recently updated my system from Ubuntu 18.04 to 20.04. Afterwards I tried to update all of my pip3 packages using the shell command mentioned here (I changed "pip" to "pip3").
After it updated a couple of packages, this prompt came up:
KDE Wallet Service
Since I never saw it while updating/installing a package, I cancelled it which resulted in an instant reopening of the same prompt and the terminal showed following warning:
WARNING: Keyring is skipped due to an exception: Failed to unlock the keyring!
I pressed CTRL+C after the same happend with the next package it tried to install. Ever since when I try to install a package the same happens.
Example:
pip3 install numpy
WARNING: Keyring is skipped due to an exception: Failed to unlock the keyring!
WARNING: Keyring is skipped due to an exception: Failed to unlock the keyring!
Collecting numpy
WARNING: Keyring is skipped due to an exception: Failed to unlock the keyring!
Using cached numpy-1.19.2-cp38-cp38-manylinux2010_x86_64.whl (14.5 MB)
Installing collected packages: numpy
WARNING: The scripts f2py, f2py3 and f2py3.8 are installed in '/home/gesuchter/.local/bin' which is not on PATH.
Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
Successfully installed numpy-1.19.2
I already tried to fix my issue with reinstalling python3-pip.
Here are hopefully some helpful information:
pip3 --version
pip 20.0.2 from /usr/lib/python3/dist-packages/pip (python 3.8)
ls ~/.local/share/keyrings
default login.keyring user.keystore
find ~/.config/kwalletrc
find: ‘/home/gesuchter/.config/kwalletrc’: No such file or directory
This solved it for me:
python3 -m keyring --disable
Running it adds:
[backend]
default-keyring=keyring.backends.null.Keyring
to the file ~/.config/python_keyring/keyringrc.cfg.
Presumably PYTHON_KEYRING_BACKEND=keyring.backends.null.Keyring mentioned at https://stackoverflow.com/a/68504137/895245 offers an environment variable way to achieve the same result.
Without this, it would show the annoying KDE keyring popup every time I try to install a package:
Google, index this:
The KDE Wallet System
The application '/usr/lib/python3/dist-packages/pip/__main__.py' has requested to create a new wallet named 'kdewallet'. This is used to store sensitive data in a secure fashion. Please choose the new wallet's type below or click cancel to deny the application's request.
Classic, blowfish encrypted file
Use GPG encryption, for better protection
Related: https://askubuntu.com/questions/1205161/annoying-kde-wallet-service-popup-the-application-kded5-has-requested-to-open
Tested on Ubuntu 21.04, Python 3.9.5, pip3 20.3.4, keyring==22.2.0.
This issue was reported upstream, see https://github.com/pypa/pip/issues/8090 and the other issues linked from that thread.
tl;dr: new versions of pip too eagerly search keyrings for credentials that might be required to access some package downloads. If it ends up querying a keyring (such as kdewallet) which doesn't exist yet, the prompt you noticed shows up. It's not yet clear how exactly and in which release this will be fully fixed.
EDIT: Please note that stackoverflow is not the right place for bug reports: pip maintainers are unlikely to see this, and as far as I can tell it's also not really in scope for stackoverflow. It could be a question for another stackexchange community (superuser maybe?). But since you were already sure that this was a problem with pip, the best place for a report would have been any of the communication channels indicated in the README on https://github.com/pypa/pip
You can add this to your startup file
export PYTHON_KEYRING_BACKEND=keyring.backends.null.Keyring
Credit to jrd's comment on a python bug
This post summarize my painful but finally successful (just by chance) way to build own conda package for the
netgen meshing tool with Python interface. I found the recipe for the netgen build due to tpaviot.
After cloning the repository into 'netgen-conda' folder I ran:
conda build netgen-conda/netgen-6.2-dev
Which reports "Unsatisfiable dependencies": 'oce', 'gcc-5', 'binutils'.
So I tried to install these packages myself. Unfortunately the documentation do not emphasize the important fact that 'conda build' use its own temporary environment so it doesn't matter what you have installed (see). Nevertheless even installing 'gcc-5' together with 'binutils' manually turns out to be nearly impossible.
Hint for other newbies: Lot of my problems disappear after I learned details about channels.
First try was installing 'gcc-5' with 'binutils' from the 'salford_systems' channel suggested by anaconda:
conda install -c salford_systems binutils gcc-5
But it results in:
ERROR conda.core.link:_execute_actions(337): An error occurred while installing package 'salford_systems::gcc-5-5.3.0-0'.
LinkError: post-link script failed for package salford_systems::gcc-5-5.3.0-0
running your command again with-vwill provide additional information
location of failed script: /home/jb/miniconda3/envs/test/bin/.gcc-5-post-link.sh
Using verbose output ('-v') provides no more info. I was also confused by the fact that the script does not exist on the given path (probably automatically deleted).
With current experience I admit that the reason of problem can be dug out from the '-vv' output (reported issue). After some trying I found that only way to
install both is to first install 'gcc-5' into a clean environment and then install 'binutils'. Since 'conda build' installs everything
from scratch and there is no way to specify order of installed packages I was stuck.
Another issue that puzzled me is the 'conda build' long prefix hack. For unknown reason they use extremely long prefix for an auxiliary folder
which result in various kind of issues. I have faced to three such problems:
As is usual today, I have encrypted HOME causing a known issue.
Using a workaround '--croot /tmp' prevents creating the hard links from '/tmp' into 'HOME/miniconda3' since they are on different filesystems.
There is a fallback to use the copy. I even thought that the fallback doesn't work for a while, but it worked, just making the build running longer.
Trying to install 'gcc' (4.x) from 'default' channel complained about too short prefix. So ultimate workaroud was to set the length of the prefix manually
'--prefix-length 70'.
Finally, I found that the dependency on 'binutils' is not necessary and successfully build the package with:
conda build --prefix-length 70 -c salford_systems -c conda-forge -c dlr-sc netgen-conda/netgen-6.2-dev
Summary (of open questions):
Conda channels introduce a new kind of dependency hell already forgotten when using 'apt-get'. Is there a way to figure out what is a canonical channel for a package.
Does anyone succeed to build with combination 'gcc-5' and 'binutils'?
There is still lack of documentation about internal conda mechanisms and error messages do not provide clue to the problem.
Conda-build use a problematic prefix hack and lack ability to control order of installed packages. Does anybody know the reason for this hack?
Wondering if anyone has had any luck running logstash on Windows 10. I can get the simple stdin input and stdout outputs to work, but I can't install any additional plugins. For example, running .\logstash-plugin.bat install logstash-input-heroku yields this output:
Validating logstash-input-heroku Installing logstash-input-heroku
Error Bundler::InstallError, retrying 1/10 An error occurred while
installing net-ssh (4.0.1), and Bundler cannot continue. Make sure
that gem install net-ssh -v '4.0.1' succeeds before bundling.
WARNING: SSLSocket#session= is not supported Error
Bundler::InstallError, retrying 2/10 An error occurred while
installing net-ssh (4.0.1), and Bundler cannot continue. Make sure
that gem install net-ssh -v '4.0.1' succeeds before bundling.
WARNING: SSLSocket#session= is not supported
(etc.)
I don't see windows 10 in the logstash support matrix so I'm guessing it's not intended to work. Perhaps on the linux subsystem for windows? Has anyone tried that? Doesn't look like java8 runs on it.
Well installation seems to have now succeeded. Thanks #Darth_Vader for the suggestion. Here's the source github issue that I referred to. The issue was resolved after updating the Gemfile (in logstash root folder) and changing the net-ssh and rest-client library versions:
# This is a Logstash generated Gemfile.
# If you modify this file manually all comments and formatting will be lost.
source "https://rubygems.org"
gem "net-ssh", "2.9.0"
gem "rest-client", "1.7.2"
gem "logstash-core", :path => "./logstash-core"
(etc...)
I want to install the latest gcc49 in a Ubuntu Linux, and I am familiar with Homebrew in Mac, so I would like to use the Linux version of it, i.e., Linuxbrew. So I installed Linuxbrew and typed
$ brew install gcc49
The dependencies gmp4, mpfr2 and etc. will be installed first. I have added a if OS.mac? condition in gmp4 so it can be installed successfully, but when installing mpfr2 (also added the condition), the make check failed with the error:
...
/tmp/mpfr2-i5YD/mpfr-2.4.2/tests/.libs/lt-tpow_all: error while loading shared libraries: libgmp.so.3: cannot open shared object file: No such file or directory
FAIL: tpow_all
=======================
148 of 148 tests failed
=======================
As you can see, the tests can not find libgmp.so.3 which is just installed. But gmp4 is keg only since it will conflict with gmp in main repository.
But the configure options are set with the correct location of gmp4:
./configure --disable-dependency-tracking --prefix=/home/dongli/.linuxbrew/Cellar/mpfr2/2.4.2 --with-gmp=/home/dongli/.linuxbrew/opt/gmp4
How to solve this problem? Thanks!
You think you are doing it wrong by insisting on a third-party scripting solution that is not native to the OS.
There are prebuilt versions of gcc et al provided by the same maintainers in this PPA on Launchpad. These are previews / testreleases of what will be in the next Ubuntu releases.
I found the problem, that is the environment has been reset after each system call in Ruby formula. So we need to set the correct LD_LIBRARY_PATH as
if OS.linux?
ENV["LD_LIBRARY_PATH"] = "#{Formula["..."].opt_prefix}/lib:...:$LD_LIBRARY_PATH"
end
so that LD_LIBRARY_PATH persists during the build processes.