Can't add new PPAs because of JSON error

All Gurus once were Newbies
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Please stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions prefer the other forums within the support section.
Before you post please read how to get help
Post Reply
second.exodous
Level 1
Level 1
Posts: 36
Joined: Sun Nov 07, 2010 3:27 pm

Can't add new PPAs because of JSON error

Post by second.exodous » Fri Jun 07, 2013 7:48 pm

I keep getting his error when trying to add a PPA:

Code: Select all

Cannot add PPA: 'No JSON object could be decoded'.
I've tried adding PPAs through the command line and the new graphical Software Sources and get the same thing so it isn't a problem with the new GUI.

Here are some examples of a PPAs I tried to add:

Code: Select all

deb http://ppa.launchpad.net/stebbins/handbrake-releases/ubuntu raring main

Code: Select all

deb http://ppa.launchpad.net/transmissionbt/ppa/ubuntu raring main
Those are just two examples. I have always went to the ppa page, copied the lines after selecting what version of Ubuntu I use and pasted it into software sources, did something change?

Thanx,
Stan
Last edited by second.exodous on Fri Jun 07, 2013 8:21 pm, edited 1 time in total.

second.exodous
Level 1
Level 1
Posts: 36
Joined: Sun Nov 07, 2010 3:27 pm

Re: Can't add new PPAs because of JSON error

Post by second.exodous » Fri Jun 07, 2013 8:18 pm

I kinda fixed it, but it was 'a work around' kinda, instead of adding a new PPA I just added a new repository and still put the Authentication keys like normal. Not sure if this is a bug or not, I googled it and no one else as having this problem. I did have it on 2 of my machines though. . .

kajukenbo
Level 1
Level 1
Posts: 17
Joined: Sat Jun 08, 2013 7:09 pm
Contact:

Re: Can't add new PPAs because of JSON error

Post by kajukenbo » Sat Jun 08, 2013 7:31 pm

Same problem here, trying to add Handbrake.
I thought I'd give Mint 15 a try in place of LMDE - only because it has a newer kernel & mounts the SD cards in my Galaxy S3 correctly.
I see the exact same errors you experienced.
Granted, as a Red Hat & Debian guy I am more familiar with repo files and the sources.list than configuring with PPA.
I also prefer the command line. I hate GUIs that keep me isolated from what is actually being done - harder to understand & fix that way.

I added Handbrake the "old school" way. Seems to work.
If you are not root then you need to use "sudo", of course.

# wget -Nc http://ppa.launchpad.net/stebbins/handbrake-releases/ubuntu/pool/main/h/handbrake/handbrake-cli_0.9.9ppa1~raring1_i386.deb
# wget -Nc http://ppa.launchpad.net/stebbins/handbrake-releases/ubuntu/pool/main/h/handbrake/handbrake-gtk_0.9.9ppa1~raring1_i386.deb
# dpkg -i handbrake-cli_0.9.9ppa1~raring1_i386.deb handbrake-gtk_0.9.9ppa1~raring1_i386.deb

You should also make sure dependencies like x264, ffmpeg & libdvdcss2 are installed.

I only use 64-bit installs when required, so you may need to pick your own packages here:
http://ppa.launchpad.net/stebbins/handbrake-releases/ubuntu/pool/main/h/handbrake/

second.exodous
Level 1
Level 1
Posts: 36
Joined: Sun Nov 07, 2010 3:27 pm

Re: Can't add new PPAs because of JSON error

Post by second.exodous » Sat Jun 08, 2013 10:18 pm

I come from Gentoo myself and everything was command line. I switched years ago because GUI is 'good enough' now and I was spending all my free time maintaining my computer and learning about Linux. I like Linux but not enough to spend most of my free time learning it so I made the jump to Ubuntu and then to Mint. I rarely do anything command line way anymore but can't dump Linux because of the lack of spyware and viruses. Oh, and the cost, zill.

Anyway, I installed 15 on another notebook and the same thing, when adding PPAs though the GUI I get the same error. The work around where just adding PPAs through 'Additional repositories' works still. I can't find anything about this, maybe people that use the GUI don't add PPAs and everyone who uses them just uses the command line? Should I submit this as a bug though, same problem on 3 separate computers is strange. I even checked the MD5 sum on the DVD I downloaded and then re-downloaded it anyway before installing on the third computer and still the same thing.

kajukenbo
Level 1
Level 1
Posts: 17
Joined: Sat Jun 08, 2013 7:09 pm
Contact:

Re: Can't add new PPAs because of JSON error

Post by kajukenbo » Sat Jun 08, 2013 10:43 pm

I've been a professional UNIX & Linux Systems Admin/Engineer for about 10 years, using Linux as my sole home & business OS for that time.
I started with Debian in 1994 or 1995, then to Arch, Fedora, Red Hat/CentOS (I'm a RHCT & RHCSA), Fuduntu and now back to Debian via LMDE/MATE.
About the only thing I use a GUI for is a terminal manager, web browser/media player & file manager.
Since Linux administration is my "day job", the command line is usually my only option and I must know it well.
Trying to run a GUI over a 115200 baud (or slower!) SoL IPMI connection is not...viable. ;-)

I flirted with Gentoo and gave it up when it once took all weekend to "emerge world".
I do not like the way Ubuntu breaks upstream compatibility with Debian and this PPA thing is yet another annoyance.

I imagine I'll be re-installing LMDE before the weekend is over, but for now I'll play with LM15 some more.

Nick Payne
Level 3
Level 3
Posts: 101
Joined: Sun Feb 21, 2010 8:49 pm

Re: Can't add new PPAs because of JSON error

Post by Nick Payne » Sun Jun 09, 2013 2:45 am

second.exodous wrote:I keep getting his error when trying to add a PPA:

Code: Select all

Cannot add PPA: 'No JSON object could be decoded'.
I've tried adding PPAs through the command line and the new graphical Software Sources and get the same thing so it isn't a problem with the new GUI.

Here are some examples of a PPAs I tried to add:

Code: Select all

deb http://ppa.launchpad.net/stebbins/handbrake-releases/ubuntu raring main

Code: Select all

deb http://ppa.launchpad.net/transmissionbt/ppa/ubuntu raring main
If you're trying to add a ppa, the command should be (eg for your second example)

Code: Select all

sudo add-apt-repository ppa:transmissionbt/ppa
That works fine. The examples you have given above are the lines you would actually add to your /etc/sources.list with a text editor (and then import the signing key) if adding the repository manually.

second.exodous
Level 1
Level 1
Posts: 36
Joined: Sun Nov 07, 2010 3:27 pm

Re: Can't add new PPAs because of JSON error

Post by second.exodous » Sat Jun 15, 2013 3:00 am

Yes, adding through the command line works great, it is the GUI that seems broke. It will be a deal breaker for a newbie that is trying out Linux for the first time, that is why I'm concerned.

Nick Payne
Level 3
Level 3
Posts: 101
Joined: Sun Feb 21, 2010 8:49 pm

Re: Can't add new PPAs because of JSON error

Post by Nick Payne » Sat Jun 15, 2013 6:26 pm

On my machine (Mint 15 amd64 Cinnamon), adding a ppa via the GUI works fine. Open Software Sources, click on PPAs, click on Add a new PPA, enter the PPA name (I used ppa:dhor/myway as a test), click OK twice, and the PPA is added to your sources.

60niners
Level 1
Level 1
Posts: 38
Joined: Tue Jul 16, 2013 3:09 pm

Re: Can't add new PPAs because of JSON error

Post by 60niners » Tue Jul 16, 2013 3:13 pm

Nick Payne wrote:On my machine (Mint 15 amd64 Cinnamon), adding a ppa via the GUI works fine. Open Software Sources, click on PPAs, click on Add a new PPA, enter the PPA name (I used ppa:dhor/myway as a test), click OK twice, and the PPA is added to your sources.
Pretty sure I have the same version as you do; just downloaded it yesterday. I get the same JSON error whether trying to add a PPA through the terminal or through the Software sources app.

I am extremely new to linux (yesterday) so I've been googling a lot lol... and can't seem to find an answer to this one?

Been trying to add this: sudo add-apt-repository ppa:mozillateam/firefox-stable

Enkouyami
Level 1
Level 1
Posts: 26
Joined: Sat May 28, 2011 9:21 pm

Re: Can't add new PPAs because of JSON error

Post by Enkouyami » Sat Jul 27, 2013 3:24 pm

I got it too while trying to do sudo add-apt-repository "deb http://repository.spotify.com stable non-free" and adding from Software Sources produces the same error.

giantjoebot
Level 1
Level 1
Posts: 17
Joined: Sun Sep 30, 2012 3:26 pm

Re: Can't add new PPAs because of JSON error

Post by giantjoebot » Tue May 13, 2014 11:13 pm

Found a work around. I remembered that I installed ajaxplorer without problem, so I just checked their instructions and went from there. http://pyd.io/download/

So I was trying to install tvheadend, and this is how I got it to work

I added the key, i had to install curl

Code: Select all

sudo apt-get install curl

Code: Select all

curl http://apt.tvheadend.org/repo.gpg.key | sudo apt-key add -
then since sudo apt-add-repository http://apt.tvheadend.org/stable wasn't working I manually append /etc/apt/sources.list

Code: Select all

sudo gedit /etc/apt/sources.list
I had to go to http://apt.tvheadend.org/stable with my web browser to figure out how to make the lines that I need. I could be wrong but it always seems to be in dists/. With ajaxplorer it was "stable main" but tvheadend was "saucy main" So I added the following 2 lines to /etc/apt/sources.list

Code: Select all

deb http://apt.tvheadend.org/beta saucy main 
deb-src http://apt.tvheadend.org/beta saucy main
then just

Code: Select all

sudo apt-get update
and

Code: Select all

sudo apt-get install tvheadend
And everything seems to be working. So I hope this help someone else.

jrmwalsh
Level 1
Level 1
Posts: 3
Joined: Mon Mar 17, 2014 5:11 pm

Re: Can't add new PPAs because of JSON error - SOLVED

Post by jrmwalsh » Sun Jun 15, 2014 9:17 am

I received the error message "Cannot add PPA: 'No JSON object could be decoded'." when trying to add the Daniel Richter repository, so that I could install Grub-Customizer.
I tried it about half a dozen times but kept getting the same error.
I was very puzzled, because I have used this command so often, on so many Linux computers, that I have it in a text file on a thumb drive and I just copy-paste the command into the CLI input. So I knew I wasn't making a typo.

The problem turned out to be very simple; the repository was simply off-line temporarily on the weekend.

I waited and tried again six hours later and it worked perfectly.
Mike.

In this world there are just two types of people. There are those who divide the world into two types of people, and there are those who don't.

KirbySmith
Level 4
Level 4
Posts: 281
Joined: Sun Feb 03, 2013 10:25 pm

Re: Can't add new PPAs because of JSON error

Post by KirbySmith » Sun Jun 15, 2014 11:02 am

I had this problem with FreeCAD. The directions in one FreeCAD location were, as Nick Payne noted above, suitable for pasting into a list, as Mint used to do in Synaptic. The directions in another FreeCAD location, which worked, used a string that did NOT include the build information (e.g., "trusty main"). These latter parameters now seem to be picked up correctly when the repository is interrogated.

kirby
Desktop 1: DFI Lanparty UT nF4 SLI-D/AMD Athlon 64 San Diego/BFG GeForce 7800 GT/Mint 17.3 MATE
Desktop 2: Gigabyte 770T-USB3/AMD Phenom II X4 965/EVGA GeForce 9800 GT/Mint 17.3 MATE
HTPC: Asus C6H/AMD Ryzen 7 1800X, Asus Geforce 1080 Ti/Mint 18.1 MATE

xijunw
Level 1
Level 1
Posts: 6
Joined: Tue Sep 04, 2012 4:22 pm

Re: Can't add new PPAs because of JSON error

Post by xijunw » Mon Oct 27, 2014 2:49 pm

I had the same problem here when trying to add "nemh/gambas3" through command line and GUI on my linuxmint 17 v2, 64 desktop to install GAMBAS3.5.

After search and digging, I found this problem is simply because current version of Linuxmint disabled GAMBAS3.5 support while GAMBAS3.1 is already supported through synapitic. If one needs to install the latest version of GAMBAS, try "sudo add-apt-repository ppa:gambas-team/gambas-daily".

So, if tyou encounter such problem, one of the likely reasons is the post/instruction that you follow is outdated. You may go to the official website of the package for latest news.

On the other hand, Linuxmint should give more friendly and human readable error information rather than "JSON error".

wolverine789
Level 1
Level 1
Posts: 25
Joined: Thu Aug 21, 2014 2:49 am

[SOLVED] Can't add new PPAs because of JSON error

Post by wolverine789 » Thu Jan 29, 2015 3:24 am

Thankyou :) xijunw for the above. I too had same error trying to install i-nex using the following -
sudo add-apt-repository ppa:i-nex-development-team/daily
sudo add-apt-repository ppa:nemh/gambas3
until I came across your post :D

Post Reply

Return to “Newbie Questions”