LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Bodhi
User Name
Password
Bodhi This forum is for the discussion of Bodhi Linux.

Notices


Reply
  Search this Thread
Old 06-04-2019, 10:33 AM   #1
Rosika
Member
 
Registered: Apr 2017
Distribution: Lubuntu 64 bit
Posts: 216

Rep: Reputation: Disabled
Problems when trying to add a ppa


Hi altogether,

I use Bodhi Linux in a VM. These are the specs:

Code:
uname -a
Linux rosika-virtual-machine 4.8.0-34-generic #36~16.04.1-Ubuntu SMP Wed Dec 21 18:54:55 UTC 2016 i686 i686 i686 GNU/Linux
The system should be up-to-date as I´ve performed an update just now.

I use firejail but the version of the repository is pretty much outdated. So I wanted to add:

Code:
sudo add-apt-repository ppa:deki/firejail
in the terminal.
But here I encountered a problem. Terminal says:

Code:
Traceback (most recent call last):
  File "/usr/bin/add-apt-repository", line 11, in <module>
    from softwareproperties.SoftwareProperties import SoftwareProperties, shortc
ut_handler
  File "/usr/lib/python3/dist-packages/softwareproperties/SoftwareProperties.py"
, line 27, in <module>
    import apt_pkg
ImportError: /usr/lib/python3/dist-packages/apt_pkg.cpython-35m-i386-linux-gnu.s
o: symbol _ZN9pkgSystem9LockInnerEv, version APTPKG_5.0 not defined in file liba
pt-pkg.so.5.0 with link time reference
Error in sys.excepthook:
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/apport_python_hook.py", line 63, in appor
t_excepthook
    from apport.fileutils import likely_packaged, get_recent_crashes
  File "/usr/lib/python3/dist-packages/apport/__init__.py", line 5, in <module>
    from apport.report import Report
  File "/usr/lib/python3/dist-packages/apport/report.py", line 30, in <module>
    import apport.fileutils
  File "/usr/lib/python3/dist-packages/apport/fileutils.py", line 23, in <module>
    from apport.packaging_impl import impl as packaging
  File "/usr/lib/python3/dist-packages/apport/packaging_impl.py", line 23, in <module>
    import apt
  File "/usr/lib/python3/dist-packages/apt/__init__.py", line 23, in <module>
    import apt_pkg
ImportError: /usr/lib/python3/dist-packages/apt_pkg.cpython-35m-i386-linux-gnu.so: symbol _ZN9pkgSystem9LockInnerEv, version APTPKG_5.0 not defined in file libapt-pkg.so.5.0 with link time reference

Original exception was:
Traceback (most recent call last):
  File "/usr/bin/add-apt-repository", line 11, in <module>
    from softwareproperties.SoftwareProperties import SoftwareProperties, shortcut_handler
  File "/usr/lib/python3/dist-packages/softwareproperties/SoftwareProperties.py", line 27, in <module>
    import apt_pkg
ImportError: /usr/lib/python3/dist-packages/apt_pkg.cpython-35m-i386-linux-gnu.so: symbol _ZN9pkgSystem9LockInnerEv, version APTPKG_5.0 not defined in file libapt-pkg.so.5.0 with link time reference
I don´t know what to make of it and how to remedy the situation.

Can anyone help?

Tnx a lot in advance.

Greetings
Rosika
 
Old 06-04-2019, 12:46 PM   #2
rbtylee
Bodhi Developer
 
Registered: Jun 2018
Location: Ladson, SC US
Distribution: Bodhi
Posts: 156

Rep: Reputation: 173Reputation: 173
That is certainly a mess.

Officially Bodhi does not recommend the usage of PPAs. Unless of course you know what you are doing.

As to the issue, I would think you have some sort of package conflicts going on here. You probably have the wrong versions of some important packages installed, however it happened. Now this is just a semi educated guess based on the error message posted above.

[You are probably using BL 4.5 so skip this if so ... See comment below]

Note I am going to assume you are using Bodhi 5.0, if not tell me:

So first thing I would try is

Code:
sudo apt-get --reinstall install libapt-pkg5.0

Last edited by rbtylee; 06-05-2019 at 04:41 PM.
 
1 members found this post helpful.
Old 06-04-2019, 04:27 PM   #3
rbtylee
Bodhi Developer
 
Registered: Jun 2018
Location: Ladson, SC US
Distribution: Bodhi
Posts: 156

Rep: Reputation: 173Reputation: 173
OK, I have found out this is a known Bodhi linux 4.5 issue.

So assuming you are using bodhi linux 4.x and a system update has broken add-apt-repository. This is not your fault it is a package conflict with Bodhi 4.5 modified version of apt and the version of apt and python-apt stuff you updated to.

Bodhi 5.0 users are not going to have this issue.

Open synaptic and Force and lock the versions of these three packages: apt apt-util and libapt-pkg5.0. I used version 1.2.31 on all three. Now add-apt-repository should work.

I could fix this in Bodhi 4.5 repos but officially we no longer support BL 4.5 and advise users to update to BL 5.x.

OK One more thing to note: Lock version in synaptic doesn't work correctly in BL 4.x. This one is a Ubuntu issue. But note do not let apt-get update update the three packages above you forced the version of. Or if you do redo this process.

Last edited by rbtylee; 06-04-2019 at 04:32 PM.
 
1 members found this post helpful.
Old 06-05-2019, 07:20 AM   #4
Rosika
Member
 
Registered: Apr 2017
Distribution: Lubuntu 64 bit
Posts: 216

Original Poster
Rep: Reputation: Disabled
Hello rbtylee,

thank you so much for yor help. It worked!!!!!! You´re a genius.

First of all it´s comforting to know that I didn´t bring about the issue myself. I was already beginning to wonder.....

Then I did what you suggested:

Quote:
Open synaptic and Force and lock the versions of these three packages: apt apt-util and libapt-pkg5.0. I used version 1.2.31 on all three. Now add-apt-repository should work.
And it really did work!

I could add the respective repository with
Code:
sudo add-apt-repository ppa:deki/firejail
without any difficulties. After that I wanted to upgrade to the latest version of firejail (0.9.60-1~0ubuntu16.04.0).
At first the package was held back. Then I decided to go for "sudo apt-get dist-upgrade". That one worked perfectly and I now have the latest firejail-version.

So thanks again for your valuable help. I appreciate it very much.

Greetings.
Rosika

P.S.:

I could never figure out what BL-version I have. The only info I got is:

Code:
uname -a
Linux rosika-virtual-machine 4.8.0-34-generic #36~16.04.1-Ubuntu SMP Wed Dec 21 18:54:55 UTC 2016 i686 i686 i686 GNU/Linux

 lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Bodhi Linux
Release:        16.04
Codename:       xenial
But what that translates to I really cannot say.
 
1 members found this post helpful.
Old 06-05-2019, 09:27 AM   #5
rbtylee
Bodhi Developer
 
Registered: Jun 2018
Location: Ladson, SC US
Distribution: Bodhi
Posts: 156

Rep: Reputation: 173Reputation: 173
Thanks and glad it worked

Quote:
Originally Posted by Rosika View Post
...
I could never figure out what BL-version I have. The only info I got is:
...
The simplest thing to do is open About Bodhi in the Menu. It tells the Bodhi version on the toolbar prob placed at the top and to the right. That is prob theme dependant tho, but the version should be there. If you are using a broken theme and it is not there switch to the default theme and it will be there.
 
1 members found this post helpful.
Old 06-05-2019, 09:38 AM   #6
Rosika
Member
 
Registered: Apr 2017
Distribution: Lubuntu 64 bit
Posts: 216

Original Poster
Rep: Reputation: Disabled
Hi rbtylee,

thanks for getting back with the added information.

To my shame I have to admit that I´ve never used "About Bodhi".
I just did and thus I can confirm: my version is 4.5.0.

Glad I know that as well now.

Tnx again and have a nice day.

Greetings.
Rosika
 
1 members found this post helpful.
Old 06-05-2019, 11:31 AM   #7
the_waiter
Bodhi Developer
 
Registered: Jun 2018
Location: Banská Bystrica, Slovakia
Distribution: Bodhi Linux
Posts: 429

Rep: Reputation: 374Reputation: 374Reputation: 374Reputation: 374
Hello there

Nice your issue has been solved.

I would also encourage you to install BL 5.0 as the repository is fully supported. Also you will be ready for upcoming BL 5.1 upgrade with hundreds of Moksha stability and security patches and new Bodhi features which are missing in BL 4.x

Stefan
 
2 members found this post helpful.
Old 06-06-2019, 11:38 AM   #8
madmax25
Member
 
Registered: Aug 2018
Posts: 212

Rep: Reputation: Disabled
When you force and lock packages, you should "hold" them as well.
Otherwise they will be updated when you use the terminal for your next system updates.

Here's how you hold packages:

Code:
sudo apt-mark hold
followed by the name(s) of the wanted package(s).

To remove the "hold", just use the same command, but replace hold with unhold.
 
1 members found this post helpful.
Old 06-07-2019, 07:13 AM   #9
Rosika
Member
 
Registered: Apr 2017
Distribution: Lubuntu 64 bit
Posts: 216

Original Poster
Rep: Reputation: Disabled
@madmax25,

thanks for the hint.

In fact I already noticed that force and lock won´t suffice by themselves.
As you said, after triggring an update/upgrade the respective packages will be updated. I set "sudo apt-mark hold" for them - as you suggested. Now it works perfectly fine.

Another thing I have learnt now in this fantastic Linux world.

Thanks a lot again and have a nice day.

Greetings.
Rosika
 
1 members found this post helpful.
Old 06-07-2019, 07:23 AM   #10
Rosika
Member
 
Registered: Apr 2017
Distribution: Lubuntu 64 bit
Posts: 216

Original Poster
Rep: Reputation: Disabled
@the_waiter:

Hi Stefan,


Quote:
I would also encourage you to install BL 5.0
Thanks for the suggestion. It certainly seems like a worthwhile step.

Yet I first have to "save up" for getting the ISO.
The thing is: My sole medium for internet-connection is a UMTS-stick which gives me 6 GB per month (or rather: 4 weeks). That translates roughly into 207 MB per day.

But I´ll certainly get BL 5.0 as I deem it a wonderful OS.

Thanks and have a nice day.

Greetings.
Rosika
 
1 members found this post helpful.
Old 06-07-2019, 08:19 AM   #11
the_waiter
Bodhi Developer
 
Registered: Jun 2018
Location: Banská Bystrica, Slovakia
Distribution: Bodhi Linux
Posts: 429

Rep: Reputation: 374Reputation: 374Reputation: 374Reputation: 374
Enjoy
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
What's The Difference Between a PPA and a PPA (Sources)? happydog500 Linux - Software 3 06-30-2016 02:49 PM
LXer: Easily manage your PPA in Ubuntu with Y PPA Manager LXer Syndicated Linux News 0 08-12-2012 07:10 PM
LXer: Y PPA Manager: One Stop Shop For All Your PPA Related Needs in Ubuntu Natty LXer Syndicated Linux News 0 05-14-2011 11:30 AM
LXer: PPASEARCH- A tool that search and add PPA repository in ubuntu via command line LXer Syndicated Linux News 0 08-23-2010 05:50 AM
How do you add a ppa to software sources in Linux Mint? tlcmd Linux Mint 1 01-30-2010 01:47 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Bodhi

All times are GMT -5. The time now is 06:44 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration