I'm trying to upgrade my opam to the latest version of Ubuntu 14.04
chris#chris-870Z5E-880Z5E-680Z5E:~$ sudo opam update
default Downloading https://opam.ocaml.org/1.1/urls.txt
Updating ~/.opam/repo/compiler-index ...
Updating ~/.opam/compilers/ ...
Updating ~/.opam/repo/package-index ...
Updating ~/.opam/packages/ ...
The following package has been DELETED:
- camlp4.4.02.0+2
[WARNING] install and dev-repo are unknown fields in /home/chris/.opam/repo/default/packages/liquidsoap/liquidsoap.1.1.1/opam: is your OPAM up-to-date ?
[WARNING] install is an unknown field in /home/chris/.opam/repo/default/packages/ocurl/ocurl.0.7.2/opam: is your OPAM up-to-date ?
Updating the cache of metadata (~/.opam/state.cache) ...
23 to install | 17 to reinstall | 16 to upgrade | 1 to downgrade | 0 to remove
You can now run 'opam upgrade' to upgrade your system.
chris#chris-870Z5E-880Z5E-680Z5E:~$ sudo opam upgrade
[WARNING] External solver failed with inconsistent return value. Request saved to "/home/chris/.opam/log/solver-error-6572-1.cudf"
Falling back to the internal heuristic.
The dependency ocamlbuild of package variantslib.109.15.03 is not available for your compiler or your OS.
'opam upgrade' failed.
As the error message says, it appears that variantslib.109.15.03 is not available on my OS/compiler version. Is there any way I can get around this? Here is my compiler version:
chris#chris-870Z5E-880Z5E-680Z5E:~$ ocaml -version
The OCaml toplevel, version 4.02.0
First of all, don't use sudo as opam is installed in your user folder, so you may actually break it by locking it from yourself. (I think you already did it). In general, don't use sudo if you're not absolutely sure what you're doing.
The solver is unable to find a package variantslib that will fit into constraints of your system. If you're installing or using some package, that you believe should work for the Ubuntu 14.04 LTS, then I would suggest you just to start from a clean state and install it, instead of performing the update. Since you already messed with sudo, I would actually suggest you to remove the ~/.opam folder, and start with
opam init
And install whatever you need from scratch.
If I remember well, I had some issues with opam 1.1 in the past... And the opam FAQ states that you should move to opam 1.2 (because of : ubuntu bugs).... I personally use opam 1.2.2 (on ubuntu 16.04 & 12.04...)
Related
I am using zarith for handling arbitrary sized integers.
The most recent version I could find on opam.ocaml.org was v1.9.1 (published in August 2019). On the project's github page I read Latest commit a9a309d on 23 Jan (2020).
I'd like to switch to the newer version, but how do I do that? I want to
keep opam happy, and
always use the most current version of zarith.
Please help!
Indeed, currently 1.9.1 is both the latest version of Zarith available as an opam package (https://opam.ocaml.org/packages/zarith/) and as a GitHub tag (https://github.com/ocaml/Zarith/tags).
However, given this upstream Git repository also contains an .opam specification file, you can just as well use opam to install the latest development version available in the master branch, or if need be, a precise Git commit just by relying on the so-called pinning feature of opam.
So, you can run alternatively:
opam pin add -n -y -k git zarith.dev --dev-repo
or
opam pin add -n -y -k git zarith.dev "https://github.com/ocaml/Zarith.git#master"
or
opam pin add -n -y -k git zarith.dev "https://github.com/ocaml/Zarith.git#a9a309d0596d93b6c0c902951e1cae13d661bebd"
Then:
opam install zarith
Further details on the opam-pin command
The .dev version suffix is unneeded syntactically, but is recommended actually, as the zarith.opam file does not specify any version. To be more precise:
If you have other dependencies that would complain of zarith.dev when being installed, you can replace the version suffix of dev with any compatible version string, "close" to the commit or branch you selected.
However if you omit this version, opam will typically pick the latest version string from the opam package repository (i.e., 1.9.1), which wouldn't necessarily match the code of the Git branch or commit you selected.
-n, -y, and -k are the short form of the options:
--no-action (don't install the package readily but wait the subsequent opam install command),
--yes (answer potential yes/no questions without prompting − a common opam pin question is Package foo does not exist, create as a NEW package? [Y/n] if ever you'd want to install a custom package not yet released in the opam-repository),
--kind=KIND (as there are several KINDS of pinning, the most typical being version, path, and git)
If you really need to use the unreleased, in-development version of zarith you can use the --dev-repo option of opam pin add:
opam pin add --dev-repo zarith
opam install zarith
To give as much background as possible -
I have a machine learning model trained using keras i'm trying to embed on an nvidia jetson tx2.
I have set up tensorflow on there (a bit of a pain in itself) however when i run my script i'm hitting an error with protobuf.
Using TensorFlow backend.
[libprotobuf FATAL google/protobuf/stubs/common.cc:61] This program requires version 3.1.0 of the Protocol Buffer runtime library, but the installed version is 2.6.1. Please update your library. If you compiled the program yourself, make sure that your headers are from the same version of Protocol Buffers as your link-time library. (Version verification failed in "external/protobuf/src/google/protobuf/any.pb.cc".)
terminate called after throwing an instance of 'google::protobuf::FatalException'
what(): This program requires version 3.1.0 of the Protocol Buffer runtime library, but the installed version is 2.6.1. Please update your library. If you compiled the program yourself, make sure that your headers are from the same version of Protocol Buffers as your link-time library. (Version verification failed in "external/protobuf/src/google/protobuf/any.pb.cc".)
Aborted (core dumped)
So - i upgraded protobuf using pip at first but i thought the clash is because c++ version is taking priority and the version in linux was still stating 2.6.1 however after building in c++ the version is now shown as 3.1.0 however i am still getting the same error.
From the nvidia dev forums i received some feedback
"/usr/lib/aarch64-linux-gnu/libprotobuf.so.9.0.1
This means that C/C++ code will find version 2.6.
pip install protobuf-3.1.0-py2.py3-none-any.whl
This means that Python code will find version 3.1.
You need to upgrade the C++ (system) library to match version 3.1.
I don't think there's a default package on Ubuntu that does this, so you will have to either hack it by building your own and installing it on top of the system package, or you will have to find a deb package that has a newer version that will still install on your current system."
Ive really been struggling with this as i cant find a way to upgrade the system files. Any help would be much appreciated
Thanks
edit: i'm also wondering could this be a clash with GTK (i am also using openCV here so thats worth a mention!)
Please check your version of libprotobuf-dev.
Please try to uninstall your existing one on your PC with following commands:
apt-get remove --purge libprotobuf-dev
Then, build new version of libprotobuf-dev:
apt-get install autoconf automake libtool curl make g++ unzip
wget https://github.com/google/protobuf/releases/download/v3.5.0/protobuf-cpp-3.5.0.tar.gz
tar -xvf protobuf-cpp-3.5.0.tar.gz
cd protobuf-3.5.0
./autogen.sh
./configure
make
make check
sudo make install
sudo ldconfig
Good luck.
References:
https://github.com/BVLC/caffe/issues/5711
https://github.com/google/protobuf/issues/2979
step 1:
first, uninstall with purge protobuf
sudo apt-get remove --purge libprotobuf
step 2:
start a fresh one
$ wget https://raw.githubusercontent.com/jkjungavt/jetson_nano/master/install_protobuf-3.6.1.sh
sudo chmod +x install_protobuf-3.6.1.sh
./install_protobuf-3.6.1.sh #this time will take 30 min on my board.
I recently updated facebook infer on my work laptop, and am trying to update infer on my personal laptop. It installed without an issue on my work laptop, but I am getting an error (see below) on my personal laptop. Both have opam 1.2.2 and ocaml 4.03.0 installed. If I execute opam init --comp=VERSION, I see that everything is already up-to-date. Any ideas why brew install infer could be failing?
[User]-MacBook-Pro:~ [User]$ brew install infer
==> Using the sandbox
==> Downloading https://github.com/facebook/infer/releases/download/v0.9.2/infer
Already downloaded: /Users/[User]/Library/Caches/Homebrew/infer-0.9.2.tar.xz
==> ./build-infer.sh all --yes
Last 15 lines from /Users/[User]/Library/Logs/Homebrew/infer/01.build-infer.sh:
initializing opam...
Checking for available remotes: rsync and local, git.
- you won't be able to use mercurial repositories unless you install the hg
command on your system.
- you won't be able to use darcs repositories unless you install the darcs
command on your system.
[WARNING] Recommended external solver aspcud not found.
[ERROR] No OCaml compiler found in path. You should use:
opam init --comp=VERSION
[ERROR] Initialisation failed
OpamGlobals.Exit(66)
READ THIS: https://git.io/brew-troubleshooting
If reporting this issue please do so at (not Homebrew/brew):
https://github.com/Homebrew/homebrew-core/issues
These open issues may also help:
infer 0.9.3 https://github.com/Homebrew/homebrew-core/pull/5130
My work laptop is on OS X El Capitan Version 10.11.6, and my personal laptop is on macOS Sierra Version 10.12.
https://github.com/facebook/infer/issues/467
Resolved in Infer version 0.9.4.1
I am trying to install (offline installer) Qt 5.4.0 on linux 14.04 "Trusty Tahr" and I keep getting the error message:
Warning: /home/bd-01/Qt5.4.0//Tools/QtCreator/bin/sdktool: error while loading shared libraries: libGL.so.1: cannot open shared object file: No such file or directory
I've googled and searched and the answer seems to be to install libgl-dev and libglu-dev but they are already installed, per the console messages I see when installing each:
libgl-dev
`Reading package lists... Done
Building dependency tree
Reading state information... Done
Note, selecting 'libgl1-mesa-dev' instead of 'libgl-dev'
libgl1-mesa-dev is already the newest version.
libgl1-mesa-dev set to manually installed.
0 upgraded, 0 newly installed, 0 to remove and 598 not upgraded.`
libglu-dev
`Reading package lists... Done
Building dependency tree
Reading state information... Done
Note, selecting 'libglu1-mesa-dev' instead of 'libglu1-mesa-dev'
libglu1-mesa-dev is already the newest version.
libglu1-mesa-dev set to manually installed.
0 upgraded, 0 newly installed, 0 to remove and 598 not upgraded.`
So I see 2 possible problems but don't know how to adress either.
'libglu1-mesa-dev' is being substituted for 'libglu1-mesa-dev'
libglu1-mesa-dev set to manually installed
Can anyone help me understand what is going on here?
Given that you have the following items done proper:
sudo apt-get install libgl1-mesa-dev
not mixing 32 and 64 bits
you used the proper download URL
/usr/lib/x86_64-linux-gnu/mesa/libGL.so.1 is available
etc
... it seems that, as I suspected, your system was b0rked. When you are dealing with packages through the package manager, you need to ensure that the system is in a clean and proper, and not in a broken state.
Things, like apt-get auto remove run means that you system is fundamentally broken and you have to fix your system first before experimenting with packages on top of it.
I just installed opam using the quick install
http://opam.ocaml.org/doc/Quick_Install.html
I now have
$opam --version
1.1.0
which is current. I ran "opam update" and "opam upgrade" to get the latest packages. However, when I install packages, it is still giving me the old versions (such as core 109.42 instead of core 109.55):
$ opam search core
Available packages for 4.01.0:
async_core 109.42.00 Monadic concurrency library
What do I need to do to get opam to give me the latest libraries?
If you previously built from source, make sure you uninstall that first. For whatever reason, even though the opam version correctly reports "1.1.0", it was still using the old repo address. After you uninstall old opam entirely, then follow the installation instructions at the link above.
You will know you succeeded when you do "opam update" and prints:
default Downloading http://opam.ocamlpro.com/urls.txt
[NOTE] The repository 'default' will be *permanently* redirected to https://opam.ocaml.org (opam-version >= "1.1.0")