Unescaped left brace in regex is deprecated

16,258

Solution 1

it's reported upstream and upstream reports it being fixed in 2015:

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=786705

however i still see that error on my debian 8.8 with debconf-1.5.56.all installed, the machine was installed in 2016.

to fix this, i ran apt-get install debconf

you may run apt-get dist-upgrade to update all packages in system, but beware it may update to 8.8 -> 9.0

Solution 2

It's a warning. The folks who maintain that code will need to escape the left braces, e.g. change { in the regular expression to \{. Reporting this to the folks to maintain that code may help, as it's a trivial fix.

Solution 3

you simply have to open the file that is mentioned within the warning

m/^(.?)(\)?\${ <-- HERE ([^{}]+)}(.)$/ at /usr/share/perl5/Debconf/Question.pm line 72.

go to the mentioned line 72 and add a backslash in front of the left brace where the warning points to with <-- HERE

Share:
16,258

Related videos on Youtube

kuchar
Author by

kuchar

BY DAY: I'm just normal person that's working for company, usually i use coding in PHP. Also i'm IT specialist, IT help desk.. BY NIGHT: IT Demon appers... I love to code anything, anywhere.. This time i spend on learning new technics and work on private project for my clients as a freelancer. FOR FUN: I love to learn new technics of IT security, and ofcourse coding coding... :) “Imagination is more important than knowledge. For knowledge is limited to all we now know and understand, while imagination embraces the entire world, and all there ever will be to know and understand.” AE.

Updated on September 18, 2022

Comments

  • kuchar
    kuchar over 1 year

    I add to my sources.list file this repository:

    deb http://mirrordirector.raspbian.org/raspbian/ stretch main contrib non-free rpi
    

    I need that to install php7.0 on my raspberry pi, after I execute command in terminal:

    _ apt-get install -t stretch mysql-server mysql-client php7.0-mysql -y
    

    now always when I try to install any package I got many messages like this:

    Unescaped left brace in regex is deprecated, passed through in regex; marked by <-- HERE in m/^(.*?)(\\)?\${ <-- HERE ([^{}]+)}(.*)$/ at /usr/share/perl5/Debconf/Question.pm line 72.
    Unescaped left brace in regex is deprecated, passed through in regex; marked by <-- HERE in m/\${ <-- HERE ([^}]+)}/ at /usr/share/perl5/Debconf/Config.pm line 30.
    

    of course I install them properly but message looks weird.

    Anyone could tell me what it means and how to solve it?

  • kuchar
    kuchar over 7 years
    Can you tell me which file should I edit? Or if I'm wrong, they should edit file on repo?
  • rubo77
    rubo77 over 6 years
    The error warning tells you in which file and line you have to search