No JSON object could be decoded

Questions about applications and software
Forum rules
Before you post please read how to get help
Locked
Thanks4That
Level 1
Level 1
Posts: 4
Joined: Wed Mar 05, 2014 7:26 pm

No JSON object could be decoded

Post by Thanks4That » Wed Mar 05, 2014 7:34 pm

New install of LM 16.

Trying to install Nginx

Via command line:
$ sudo add-apt-repository ppa:nginx/$nginx

I get 'Cannot add PPA: 'No JSON object could be decoded'

Via Software Sources:
PPAS -> ppa:nginx/$nginx

popup: Cannot add PPA: 'No JSON object could be decoded'

New to Linux and have googled error, best result I find is its a bug, LM15 did the same and so does LM16

Many thanks

passerby
Level 6
Level 6
Posts: 1369
Joined: Sun Dec 16, 2012 7:29 pm

Re: No JSON object could be decoded

Post by passerby » Wed Mar 05, 2014 7:48 pm

Looks like a bug.
For the time being, you can still add the nginx ppa manually.
eg. Open Synaptic Package Manager, go to Settings > Repositories > Other Software, hit "Add..." and paste the full repo.
For example, I just went looking and found their development ppa (you might want something older), and the line to add was:

Code: Select all

deb http://ppa.launchpad.net/nginx/development/ubuntu saucy main
Then just update/reload and you'll have access to the PPA you added.
Home PC: Xubuntu 14.04 x64, Nvidia GTX650, i7 3770K, 16GB RAM, Asus Xonar DX
Work PC: Mint 13 x64 XFCE, Nvidia GT620, i5 3470, 8GB RAM
Laptop: System76 Kudu Pro, Xubuntu 14.04 x64

My HTML5 login themes + screenshots

Thanks4That
Level 1
Level 1
Posts: 4
Joined: Wed Mar 05, 2014 7:26 pm

Re: No JSON object could be decoded

Post by Thanks4That » Wed Mar 05, 2014 7:50 pm

Its a big bug!

Have now tried versions 15 and 16 both with the same error, how do we go about reporting such problems?

dagon
Level 7
Level 7
Posts: 1674
Joined: Mon Dec 06, 2010 4:33 am
Location: Kungälv, Sweden
Contact:

Re: No JSON object could be decoded

Post by dagon » Wed Mar 05, 2014 7:56 pm

Are you following these instructions?
http://wiki.nginx.org/Install#Ubuntu_PPA
sudo -s
nginx=stable # use nginx=development for latest development version
add-apt-repository ppa:nginx/$nginx
apt-get update
apt-get install nginx
Did you declare the nginx variable as of the line:

Code: Select all

nginx=stable # use nginx=development for latest development version
?

Thanks4That
Level 1
Level 1
Posts: 4
Joined: Wed Mar 05, 2014 7:26 pm

Re: No JSON object could be decoded

Post by Thanks4That » Wed Mar 05, 2014 8:00 pm

No, the instructions I followed were here
http://ordinary-linux-user.blogspot.com ... -mint.html

1. $ sudo add-apt-repository ppa:nginx/$nginx
2. $ sudo apt-get update
3. $ sudo apt-get install nginx

If I add the respository via the Synaptic Package Manager as show above, what steps do I need to take next, as I mentioned this is the first time I've ever used Linux Mint?

Thanks4That
Level 1
Level 1
Posts: 4
Joined: Wed Mar 05, 2014 7:26 pm

Re: No JSON object could be decoded

Post by Thanks4That » Wed Mar 05, 2014 8:02 pm

Thanks Dagon, your suggestion seems to be working

petrus86
Level 1
Level 1
Posts: 3
Joined: Fri May 30, 2014 4:19 pm

Re: No JSON object could be decoded

Post by petrus86 » Fri May 30, 2014 4:32 pm

Hello,
For my part, I had the same problem installing "Formatjunkie" on the latest version of Linux Mint (LM 17). As in the terminal it did not work, I tried as described above with Synaptic. Problem, I landed on the utility "software sources". He sent me the same error message. I tried to blow my changes with "Y-ppa-manager" and the "Add a ppa." It worked immediately, without apparent difficulty since I could then install my software.
If it can be used for other ...

echeveria
Level 1
Level 1
Posts: 3
Joined: Thu Oct 19, 2017 4:03 pm

Re: No JSON object could be decoded

Post by echeveria » Thu Oct 19, 2017 4:13 pm

Thanks4That wrote:Its a big bug!

Have now tried versions 15 and 16 both with the same error, how do we go about reporting such problems?
Still a bug on 18.2

User avatar
karlchen
Level 20
Level 20
Posts: 11319
Joined: Sat Dec 31, 2011 7:21 am
Location: Germany

Re: No JSON object could be decoded

Post by karlchen » Thu Oct 19, 2017 4:27 pm

As Dagon explained already in March 2014, 3.5 years ago, before executing the commandline
add-apt-repository ppa:nginx/$nginx
you have to define the value of the variable $nginx:
nginx=stable # use nginx=development for latest development version
and only afterwards do
add-apt-repository ppa:nginx/$nginx
You fail to follow these steps (Dagon's steps).
You fail to see that it is the undefined variable $nginx which causes the errors that you report.

Thanks4That, the thread starter, had confirmed that Dagon's steps worked. 3.5 years ago.

You could also run the commandline like this:
add-apt-repository ppa:nginx/stable or
add-apt-repository ppa:nginx/development
depending on whether you want the stable release or the development release.
Image
Linux Mint 19.2 32-bit xfce Desktop, Total Commander 9.22a 32-bit
Haß gleicht einer Krankheit, dem Miserere, wo man vorne herausgibt, was eigentlich hinten wegsollte. (Goethe)

Locked

Return to “Software & Applications”