How to downgrade libprotobuf.so - protocol-buffers

I'm trying to run a .pyc which shows this msg:
ImportError: libprotobuf.so.9: cannot open shared object file: No such file or directory
I have a newer version of libprotobuf.
Do you know how to solve this issue? I think the only way is to downgrade libprotobuf. But how can I do that and install the exact version it is asking me for?
Thanks in advance

My ubuntu 18.04 had a same problem and I solved it as follows.
Here are different version libprotobuf
(https://pkgs.org/download/libprotobuf)
$ sudo apt-get update
$ sudo apt-get install gdebi
$ wget http://archive.ubuntu.com/ubuntu/pool/main/p/protobuf/libprotobuf9v5_2.6.1-1.3_amd64.deb
$ sudo gdebi ./libprotobuf9v5_2.6.1-1.3_amd64.deb
You can use gdebi to install this deb package solving dependencies.

Related

How can I install libdouble-conversion-dev on Ubuntu 18.04?

I tried installing the libdouble-conversion-dev package using sudo apt-get install libdouble-conversion-dev but failed with the following output:
Package libdouble-conversion-dev is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package 'libdouble-conversion-dev' has no installation candidate
I have also tried running sudo apt-get update beforehand and got the same results, as well as installing from the debian file from https://packages.debian.org/buster/amd64/libdouble-conversion-dev/download but nothing seemed to have changed.
You can manually install a Debian package on a compatible Ubuntu host with sudo dpkg -i $name_of_package_file.

How to install ruby on linux in a specific folder

I try to install ruby and rails to start to learn ruby on rails.
I work on Windows. After many search and tries, I gave up and installed a fresh ubuntu 14 x64 in a VirtualBox.
I installed ruby with apt-get, but its files get spread all over the file system (/bin, /var...). So, I have to use always sudo and search all over the place when installing gems.
I would like, just like in windows, find a ruby tar.gz which I can decompress in a folder of mine, with all files at the same place, where I have the "control" over the files, and I can watch easily what it's hapenning while installing gems, rails, etc...
The problem : I cannot find any tar.gz (or similar archive) of ruby for linux which I simply can uncompress in a folder and work with it (I can manage the $path). The only one I can find is for Windows !
Thanks !
It sounds like what you want is Ruby's source code. Go to https://www.ruby-lang.org/en/downloads/ and look under "Compiling Ruby - Source Code". That's where you'll find the .tar.gz files you want. You'll need to compile and install it before you can actually use it. Installing normally copies files "all over the file system", but you can force it to install to a specific folder by passing the --prefix option to the ./configure script.
$ tar -xf ruby-2.2.1.tar.gz
$ cd ruby-2.2.1
$ ./configure --prefix=/my/ruby/dir
$ make && make install
You may need to install some dev packages in order to get it to compile, but any compilation errors should make it clear what you need.
These instructions are also described here.
Thank you Max for your response.
In case someone else tries to compile ruby on a fresh new ubuntu, this is what I had to do to build and use it with success :
Install missing dependencies :
get the latest "Stable Snapshot" from https://ftp.ruby-lang.org/pub/ruby/stable-snapshot.tar.gz and not the "Current stable"
sudo apt-get install libffi-dev
sudo apt-get install zlibc zlib1g zlib1g-dev
sudo apt-get install openssl
sudo apt-get install libssl0.9.8 [[[ first, find the latest version with : apt-cache search libssl | grep SSL ]]]
sudo apt-get install ca-certificates
sudo apt-get install libssl-dev
sudo apt-get install libreadline-dev
Then :
Edit downloaded file tools/rbinstall.rb, goto line 714 and correct the typo :
change "rescue LoadErroe" to "rescue LoadError" (not corrected in date of 20 March 2015).
Run Max's instructions above
Don't move the ruby destination folder declared with "--prefix" (even if you try to correct the shells in ruby/bin)
Finally, for using rails :
sudo apt-get install libsqlite3-dev
sudo apt-get install nodejs ==> inorder to have a js runtime

Boost-Libboost is needed in Centos7 (ContexBroker)

I am trying to install ContextBroker in Centos7:
sudo rpm -i contextBroker-0.14.1-1.X86_64.rpm
But I am getting the next error:
error: Failed dependencies:
libboost_filesystem-mt.so.5()(64bit) is needed by contextBroker-0.14.1-1.x86_64
libboost_system-mt.so.5()(64bit) is needed by contextBroker-0.14.1-1.x86_64
libboost_thread.so.5()(64bit) is needed by contextBroker-0.14.1-1.x86_64
Up to this point I thought that the solution was clear, lets install:
sudo yum install boost boost-devel boost-doc
But it was not functioning and Centos7 was giving me the same error.
Then I though that maybe it was because the static versión was needed as the error is related to libboost and not directly boost ( I do not know if this was a good assumption),but I tried and it was not functioning and Centos7 was giving me the same error.
The thing is that I am able to find those files, but I dont know how to give dependencies to rpm and in case is not possible I tried to install the following packages:
sudo rpm -i boost-1.53.0-18.el7.x86_64.rpm
However to be able to install the following two packages, I had to install boost-devel using yum, because when I tried to install the package boost-devel.1.53.0-18.el7.x86_64.rpm I was missing a lot of dependencies.
sudo rpm -i boost-static-1.53.0-18.el7.i686.rpm
(Edit. The extension .i686 is for 32 bits, so this package was not needed.)
sudo rpm -i boost-static-1.53.0-18.el7.x86_64.rpm
The result was the same.. so I have two questions:
1.Can someone tell me the name or pass me the link of the boost rpm that I am missing and that is not allowing me to install directly boost-devel from the rpm.
2.Which one is the correct order to install all the boost rpm packages in Centos7?
Thanks!!
Edit:
I found that the extension of the files that are in my system end with .so.1.53.0, and the dependencies that the rpm is asking for end with .so.5()(64bit). Can it be that the rpm is looking for a specific version of the dependencies?
here is what I did on centos 6.5 x64
get the rpm package
wget --no-check-certificate https://forge.fi-ware.org/frs/download.php/1502/contextBroker-0.15.0-1.x86_64.rpm
then because of the dependencies required (listed in https://forge.fi-ware.org/plugins/mediawiki/wiki/fiware/index.php/Publish/Subscribe_Broker_-_Orion_Context_Broker_-_Installation_and_Administration_Guide#Requirements )
we need to install EPEL (see http://fedoraproject.org/wiki/EPEL#How_can_I_use_these_extra_packages.3F ) by running
yum install epel-release
then install each dependency:
yum install boost-filesystem
yum install boost-thread
yum install libmicrohttpd
yum install logrotate
then
rpm -i contextBroker-0.15.0-1.x86_64.rpm
it worked for me.
Hope this help
Finally I have been able to resolve the problem with the dependencies.
ContextBroker is depending on the old packages of boost for Centos 6, so to be able to install ContextBroker in Centos7 you have to remove the newest versions of boost from the system (to me this solution was not a problem, because in my case I am using a VM just to be able to exclusively use contextBroker but this can be a real problem with the dependencies of other packages that are using the corresponding version of boost for Centos7):
sudo yum remove boost boost-devel boost-system boost-filesystem boost-thread
Later it is needed the downloading and installation of the old packages:
sudo rpm -Uvh boost-thread-1.41.0-25.el6.x86_64.rpm
sudo rpm -Uvh boost-system-1.41.0-25.el6.x86_64.rpm
sudo rpm -Uvh boost-filesystem-1.41.0-25.el6.x86_64.rpm
And then is possible to install ContextBroker:
sudo rpm -i context-0.15.0-1.x86_64.rpm
I hope this helps to the new contextBroker's users!

Error while installing ruby using rvm

Am getting the below error while trying to install ruby using rvm:
$rvm install 1.9.3
Searching for binary rubies, this might take some time.
Checking requirements for ubuntu.
Installing requirements for ubuntu.
Updating system..................................................................................................
Error running 'requirements_debian_update_system ruby-1.9.3-p448',
please read /home/troy/.rvm/log/1379872584_ruby-1.9.3-p448/update_system.log
Requirements installation failed with status: 100.
Can you help me on this!
Remove broken or 404 repos from your /etc/apt/sources.list.
rvm will fail if you don't remove or comment them out.
To work out which aren't working, run apt-get update and see which ones are marked as failing.
Once you are using rvm, installing Ruby is easy.
rvm install ruby
rvm use ruby --default
I had the same problem.
It isn't unusual to not have a binary package for you distribution, and rvm should try to install from source.
First, check that it didn't actually install it:
rvm list
Otherwise, I suspect you may be missing some depedencies, which you can find with:
rvm requirements
You'll need to install those and the run the install again.
make sure you can update your system:
sudo apt-get update
and then start rvm installation again.
Update 1:
also it looks like you are using old version of rvm, make sure to update rvm before continuing:
rvm get stable
been having a similar problem and discovered a typo in grizzly.list file
http://ubuntu-cloud.archive.cononical.com precise-updates/grizzly
should have been
http://ubuntu-cloud.archive.canonical.com precise-updates/grizzly
i.e. first a in canonical
is this mistake part of the ubuntu 12.04 distribution?
Make sure when you run sudo apt-get update, all your PPAs are updating correctly. If not, remove them or edit them so they do so (you might need to change the distribution, for example, from raring to lucid. You can do this through terminal or Software Center. This and this should help)
When you are initially installing rvm, read the notes. For suppose you get notes like,
create a * WARNING: You have '~/.profile' file, you might want to load it,
to do that add the following line to '/home/name/.bash_profile':source ~/.profile
Then-> $ sudo gedit /home/name/.bash_profile
Add line `~/.profile` to the file. Save and close it.
now run $ rvm requirements
You should get a success message.
RVM will not install ruby if apt-get is failing. I had the same issue and noticed when running apt-get update, it was failing on "google-chrome.list". I fixed it following these directions and was then able to successfully run apt-get update, which then allowed me to run rvm install ruby.
Edit google-chrome.list (assuming you’re on the Stable Channel):
sudo gedit /etc/apt/sources.list.d/google-chrome.list
In the text file that opens edit the file so that the line reads:
deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main
Try to update again:
sudo apt-get update
Try to run RVM again:
rvm install ruby
this problem caused in apt-get update so you have to disable the PPA :
System Settings>Software & Updates>Other Software
then reinstall.
this image show disable PPA
I was facing the same problem and just did that:
sudo rm /etc/apt/sources.list.d/webupd8team-ubuntu-sublime-text-3-bionic.list
Now it works!
I faced the same problem while executing the command
curl -L https://get.rvm.io | bash -s stable --autolibs=3 --rails
It appeared to be that I was using the command as not a previleged user. So, using
sudo curl -L https://get.rvm.io | bash -s stable --autolibs=3 --rails
solved the problem
Below solution is to solve the rvm requirment error returns 100
If any deb command is commented in /etc/apt/sources.list than try to uncomment that command from /etc/apt/sources.list
Command is:
$sudo vi /etc/apt/sources.list
If problem is not solved than replace sources.list file with other Ubuntu's sources.list
Command is:
$mv /etc/apt/sources.list
Please make a backup before doing that
Command is:
$cp /etc/apt/sources.list sources_backup.list
Problem should solve by this time, if not than reinstall the Ubuntu.
Note: If sources.list file is corrupted than it will gives problem to install other packages.
I had a permission problem, solved with:
sudo chmod 777 log
I had the above error on installing ruby-2.3.0 in Ubuntu 16.04.
Go to the file:
/etc/apt/sources.list.d/mc3man-ubuntu-trusty-media-xenial.list
and remove the below:
deb-src http://ppa.launchpad.net/mc3man/trusty-media/ubuntu xenial main
deb http://ppa.launchpad.net/mc3man/trusty-media/ubuntu xenial main
then run sudo apt-get update and after rvm install ruby-2.3.0 it's working.
you can temporarily disable updates by this
sudo apt-get update | grep "Failed"
Ruby RVM apt-get update error

Installing opencv on Ubuntu - can't find libopencv_calib3d

I successfully installed Opencv via
sudo apt-get install libcv-dev libcv4 libcvaux-dev libcvaux4 libhighgui-dev libhighgui4 opencv-doc python-opencv
But now when I try to use ruby-opencv I keep getting
libopencv_calib3d not found.
error
What am I missing?
On Ubuntu 14.04 I had this issue, which was resolved using:
sudo apt-get install libopencv-dev
Try also
sudo apt-get install libopencv-calib3d2.3
Add libopencv-calib3d-dev if you need to compile the Ruby bindings yourself.

Resources