libgtk version issue on ubuntu - c

I installed gtk+2.0 version 2.18.3 but when I run this command:
dpkg -i libgtk2.0-dev_2.18.3-1_i386.deb
I have the next error. But when I checked the /usr/lib/libgtk2.0-0 I found the version of the libgtk is 2.12.9.
Why the new installation not override the pre one? And what I should do now?
----------------------------------------ERROR------
Unpacking replacement libgtk2.0-dev ...
dpkg: dependency problems prevent configuration of libgtk2.0-dev:
libgtk2.0-dev depends on libgtk2.0-0 (= 2.18.3-1); however:
Version of libgtk2.0-0 on system is 2.12.9-3ubuntu5.
libgtk2.0-dev depends on libglib2.0-0 (>= 2.21.3); however:
Version of libglib2.0-0 on system is 2.16.6-0ubuntu1.2.
libgtk2.0-dev depends on libglib2.0-dev (>= 2.21.3); however:
Version of libglib2.0-dev on system is 2.16.6-0ubuntu1.2.
libgtk2.0-dev depends on libcairo2-dev (>= 1.6.4-6.1); however:
Version of libcairo2-dev on system is 1.6.0-0ubuntu2.
dpkg: error processing libgtk2.0-dev (--install):
dependency problems - leaving unconfigured

You can't just install a new libgtk package willy-nilly; you need to upgrade the packages that it depends on, at the same time (in this case, libglib, libcairo, and their respective dev packages).
(This question is more appropriate for Super User, and I've voted to migrate the question there.)

You probably want apt-get install libgtk2.0-dev=2.18.3-1, because most people really don't want to be in the business of manually managing package versions and dependencies.
But if that doesn't work, you'll need to manually look at the dependencies of libgtk2.0-dev (with apt-cache show libgtk2.0-dev) and download the matching versions of each package it depends on if they're not already installed (again, apt-cache show (dependency)).

Related

How to list/download the recursive BUILD dependencies of a debian package?

I've recently learned that one can use apt to download sources and easily amend, re-build, and install the package locally from Cinnamon volume step and media keys.
# Download the sources
apt source cinnamon-settings-daemon
cd cinnamon-settings-daemon-4.4.0+tricia
# Then install the build dependencies
apt build-dep cinnamon-settings-daemon
#Then build from the modified sources
apt build
Install the modified deb file (again note the version string may differ for different Cinnamon versions)
apt deb ~/cinnamon-settings-daemon_4.4.0+tricia_amd64.deb
I now also want to be able to just download all packages needed for apt build-dep as for binary package install How to list/download the recursive dependencies of a debian package?. However, when I've tried to use --download-only and then install debs files, it resulted in several other files needed:
The following additional packages will be installed:
libarchive-cpio-perl libcupsfilters-dev libicu66:i386 libltdl-dev
libmail-sendmail-perl libpng-tools libpulse0:i386 libsys-hostname-long-perl
Even $ apt-cache depends --recurse --no-recommends --no-suggests --no-conflicts --no-breaks --no-replaces --no-enhances cinnamon-settings-daemon | grep "^\w" | sort -u does not list e.g. libarchive-cpio-perl and also --download-only when I tried to substitute empty dmkg status file ($(apt-config shell STATUS Dir::State::status)) and downloaded ~500 files, not ~100, that "additional" file(s) is(are) still missing.
Added 1:
I added --no-install-recommends to apt install debs and now only two i386 remained in additional not downloaded:
The following additional packages will be installed:
libicu66:i386 libpulse0:i386
Any idea what is so special about them? These are the only i386 mentioned, 1st one listed in apt cache above. 2nd not listed, so combining two deb sets is not a way to solve.
I downloaded debs with dpkg status file corresponding to a system with less packages installed than one where I tried to install later. I assumed it ensures all required are downloaded. However, as I received an answer after facing same issue with regular (not build, sources) packages, it is not so: https://unix.stackexchange.com/a/684975/446998. Additionally installed packages included some i386 architecture packages with corresponding amd64 packages among downloaded debs, so i386 required upgrade too when amd64 were installed as needed to be kept in sync.

Could not perform backup protocol version exchange, error code -1

I need to backup iphone with libimobiledevice, using ubuntu, the device is detected but going to launch the backup commands the following error is displayed:
Started "com.apple.mobilebackup2" service on port 49343.
Could not perform backup protocol version exchange, error code -1
What could it depend on?
Several Github issues have reported this problem, like this one.
Solution:
you need to use latest version of idevicebackup and libimobiledevice
Indeed, if you use Ubuntu 20.04 (for instance), the libimobiledevice package is outdated, as of now.
If that's your case, you'll have to either wait for the next Ubuntu release (22.04) or compile it from source, what may become necessary at some point after the release of Ubuntu 22.04 anyway.
Disclaimer: downside of compiling yourself is that your binaries are not managed by the package manager. You'll have to update yourself, git pulling or downloading the newest source code releases and re-compiling everything everytime. You might have to redo all of this after a distribution upgrade. Upside is that your binaries do work...
Note: compilation steps are described on the official site only for debian; I could perform them equally well on a Linux Mint 20.3 (based on Ubuntu, based on debian). OP does not mention the OS he or she uses, but debian based seem to be the only ones available for now, so what follows should work on debian based OSes.
Compilation from source, step by step:
uninstall the official package and its dependencies and:
install the build dependencies: sudo apt install build-essential checkinstall git autoconf automake libtool-bin libplist-dev libusbmuxd-dev libssl-dev usbmuxd (see "from source" here)
get libimobiledevice source code from its repo, using for instance git clone https://github.com/libimobiledevice/libimobiledevice.git. You might get to the releases page and use the latest tar.gz instead (1.3 at the moment).
also get source code of other libraries required by libimobiledevice: libplist, libimobiledevice-glue and libusbmuxd. (I also compiled usbmuxd instead of using the official package, but I am not sure it is necessary). For each one of them, you can git clone it or download and untar the latest source code release, if available.
choose a prefix directory, where libraries and binaries will go. Create it if necessary (official libimobiledevice site suggests /opt/local and I will use this too in the next steps; in order for the compilation to work, you'll have to sudo mkdir /opt/local and export PKG_CONFIG_PATH=/opt/local/lib/pkgconfig before starting the first compilation)
to compile and install, cd to the root of each git-cloned (or source-downloaded) directory (in this order: lipblist, libimobiledevice-glue, libusbmuxd and libimobiledevice, because each one depends on the previous one) and execute, in each one of them: ./autogen.sh --prefix=/opt/local, then make and finally sudo make install. (Note, the autogen line for libimobiledevice may be ./autogen.sh --prefix=/opt/local --enable-debug, as suggested here).
Having done all of this, the iphone was not mounted automatically, I had to manually run idevicepair pair and then could mount it using ifuse ./iphone_mount_point/ (do sudo apt install ifuse if necessary) and perform a backup using idevicebackup2 backup --full iphone_backup/. Read the help of idevicebackup2 for more information.

React Native: should I install Cocoapods with gem or homebrew?

The React Native docs recommend installing Cocoapods with sudo gem install cocoapods, but I'm used to using Homebrew and have seen elsewhere that people install it with brew install cocoapods. When I try installing it with Homebrew, I get this warning:
Warning: Treating cocoapods as a formula. For the cask, use homebrew/cask/cocoapods
What I Want To Know:
What's the difference, if any, between installing Cocoapods with sudo gem install cocoapods and with brew install cocoapods
If I install it with Homebrew, should I install the regular package or the cask? What's the difference?
macOS comes with a pre-installed version of Ruby. If you try to install a gem through pre-installed Ruby, you've to use sudo by default witch is not a good practice.
Another option is to install CocoaPods in your user-level directory by following instructions available on the Sudo-less installation section.
I would suggest you install CocoaPods using brew. It's a little cleaner option and you can update it easier.
The cocoapods cask is for CocoaPads App and the formula is for the CLI only version.
Answers:
In general sudo is not good idea (not recommended). One should not do it, i.e. if your system get stolen and/or get compromised. Cocoapods comes from a trusted source, so people usually tend to install cocoapods gem on root level. Which is what essentially sudo does.
brew is package manager for macOS and brew cask takes it a bit further. It makes the process of installing and updating apps (like: Skype, Chorome) more elegant and smooth. On this question you can read short and comprehensive replies from bfontaine and cellepo.

Error while installing CodeLite IDE in Ubuntu

While installing CodeLite IDE in Ubuntu following error occurs.
Any idea?
ERROR:
The following packages have unmet dependencies:
codelite : Depends: libjbig0 but it is not installable
Depends: liblzma5 (>= 5.1.1alpha+20120614) but 5.1.1alpha+20110809-3 is to be installed
Depends: libpango-1.0-0 (>= 1.18.0) but it is not installable
Depends: libpangocairo-1.0-0 (>= 1.14.0) but it is not installable
E: Unable to correct problems, you have held broken packages.
I had a similar problem. You may need to check your version of Ubuntu, and that you've added the correct repositories. If this is the problem, then the fix is very simple!
Firstly, check your version of Ubuntu. From terminal you can do this with the command lsb_release -a. The important part, for our purpose, is the codename. I'm using Ubuntu 13, aka "saucy".
Now let's look at the multiverse repository that you added. From the terminal you can do this with sudo gedit /etc/apt/sources.list. Go down to the end of the file, and you should see something like:
## This software is not part of Ubuntu, but is offered by third-party
## developers who want to ship their latest software.
deb http://repos.codelite.org/ubuntu/ saucy universe
Make sure that your version has your ubuntu codename (in my case 'saucy'). The example code on the website is for Ubuntu 14, and so I wrongly had a 'trusty' source here. Edit the line so that it is correct for your version of Ubuntu, and then save and close the file.
Lastly, you'll need to update your repos so that the change goes through. From the terminal, run sudo apt-get update. All being well, you should now be able to sudo apt-get install codelite without the errors.
My problem was caused by too much cutting-and-pasting code from the codelite website. I followed exactly the same page as you did, and their example code is for people with Ubuntu trusy (14).
You will need to be more specific on how you tried to install codelite.
The official Debian repository manages an ancient version of codelite which we (the codelite team) do not support.
In order to get the most up-to-date version (that we support) please install it from codelite's official website (select the Download at menu at the top)
Before installing, make sure you delete the folder ~/.codelite (incase you are upgrading)
Also, the official Debian installer is split into 2 pakacges codelite and codelite-plugins make sure you purge them both before installing codelite from our repository
I'm the author of Howto install the latest codelite in Ubuntu - EuroBytes. I have tested the latest codelite on Trusty.
If you still have issues with codelite, remove like so: sudo apt-get purge codelite
Note that the dependencies links are dead. But, i managed to install it anyways:
codelite 6.1 on Ubuntu Trusty Thar 14.04.
Image from: Howto install the latest codelite in Ubuntu - EuroBytes
Install like so:
sudo apt-add-repository "deb http://repos.codelite.org/ubuntu/ $(lsb_release -sc) universe"
sudo apt-key adv --fetch-keys http://repos.codelite.org/CodeLite.asc
sudo apt-get update
sudo apt-get install codelite wxcrafter
Feel free to contact me here or on my site, for any issues you may have.
Source:
Howto install the latest codelite in Ubuntu - EuroBytes

Debian APT - some questions

How can I check which packages are currently installed?
How can I find all packages that are not installed?
Is possible to uninstall package and all files of that package (config, temporaries, etc.)?
I'm using Debian Squeeze 6.0.7.
dpkg -l
well there will be A LOT of NOT installed packages.. why would you want to do that? btw, the command apt-cache pkgnames will provide you the list of ALL available packages in the repository added in your sources.list configuration
apt-get remove will remove the installed package, but you'll normally keep the configurations, which is the desired behaviour usually.
further info: http://www.cyberciti.biz/howto/question/linux/dpkg-cheat-sheet.php

Resources