Article ID: 113221, created on Jan 25, 2012, last review on May 9, 2014

  • Applies to:
  • Operations Automation 5.4
  • Panels
  • Virtuozzo containers for Linux 4.7

Symptoms

It is not possible to create a cache for the Debian 4.0 OS template on Parallels Containers for Linux 4.7. The cache creation task fails with a similar error:

dpkg: error processing /vz/template/debian-plesk/4.0/x86/pm//archives/perl-modules_5.8.8-7etch3_all.vz.deb (--unpack):
parsing file '/vz/tmp//vzpkg.s1KTVl/cache-root/var/lib/dpkg/tmp.ci/control' near line 7 package 'perl-modules':
'Conflicts' field, reference to 'libattribute-handlers-perl': error in version: invalid character in version number

Or:

Errors were encountered while processing:
 /vz/template/debian/4.0/x86/pm//archives/perl-modules_5.8.8-7etch6_all.vz.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
Error: /usr/bin/apt-get failed, exitcode=100

Cause

A new dpkg tool, pre-packaged with Parallels Containers for Linux 4.7 to support newer Debian-based distributions, has more strict rules for package names than Debian 4.0. There are several packages in the Debian 4.0 repository that have an underscore in their "Conflicts" section; hence, the newer dpkg does not parse these values.

Even though Debian 4.0 is EOL and is not officially supported by Parallels Containers for Linux 4.7, this article suggest a number of workarounds for this issue.

Resolution

Workaround #1: Copy template files and a template cache from the other Hardware Node.

Copy /vz/template/debian/4.0/x86 and /vz/template/cache/debian-4.0-x86.tar.gz from PVCfL 4.0 or 4.6 where this template is cached. This can be done using a command similar to the following:

[root@pvcfl47 ~]# rsync -auv --rsh="ssh" root@pvcfl46.node.tld:/vz/template/cache/debian-4.0-x86.tar.gz /vz/template/cache
[root@pvcfl47 ~]# rsync -auv --rsh="ssh" root@pvcfl46.node.tld:/vz/template/debian/4.0 /vz/template/debian/

Workaround #2: Migrate a container based on the Debian 4.0 template from the other Node.

The template is automatically copied to the destination Node if the container is based on a template that is not present on the destination host. However, in some cases, you may need to apply workaround #1 first.

Workaround #3: Re-build packages without prohibited symbols.

  1. Unpack the package with the malformed "Conflicts" line:

    [root@pvclin47 ~]# mkdir perl-modules
    [root@pvclin47 ~]# cd perl-modules
    [root@pvclin47 perl-modules]# cp /vz/template/debian/4.0/x86/pm//archives/perl-modules_5.8.8-7etch6_all.vz.deb .
    [root@pvclin47 perl-modules]# ar x perl-modules_5.8.8-7etch6_all.vz.deb
    
  2. Unpack the control.tar.gz that contains the malformed file:

    [root@pvclin47 perl-modules]# tar zxf control.tar.gz
    
  3. Back up the original control file and edit all entries with an underscore symbol:

    [root@pvclin47 perl-modules]# cp control ../control.orig
    [root@pvclin47 perl-modules]# vim control
    [root@pvclin47 perl-modules]# diff -pruN ../control.orig control
    --- ../control.orig 2012-01-25 07:24:19.746980246 -0500
    +++ control 2012-01-25 07:25:56.066384953 -0500
    @@ -4,7 +4,7 @@ Section: perl
    Priority: standard
    Architecture: all
    Depends: perl (>= 5.8.8-1)
    -Conflicts: libpod-parser-perl (<< 1.32-1), libansicolor-perl (<< 1.10-1), libfile-temp-perl (<< 0.16-1), libnet-perl (<= 1:1.19-3), libattribute-handlers-perl (<< 0.78_02-1), libcgi-pm-perl (<< 3.15-1), libi18n-langtags-perl (<< 0.35-1), liblocale-maketext-perl (<< 1.08-1), libmath-bigint-perl (<< 1.77-1), libnet-ping-perl (<< 2.31-1), libtest-harness-perl (<< 2.56-1), libtest-simple-perl (<< 0.62-1), liblocale-codes-perl (<< 2.06.1-1)
    +Conflicts: libpod-parser-perl (<< 1.32-1), libansicolor-perl (<< 1.10-1), libfile-temp-perl (<< 0.16-1), libnet-perl (<= 1:1.19-3), libattribute-handlers-perl (<< 0.78), libcgi-pm-perl (<< 3.15-1), libi18n-langtags-perl (<< 0.35-1), liblocale-maketext-perl (<< 1.08-1), libmath-bigint-perl (<< 1.77-1), libnet-ping-perl (<< 2.31-1), libtest-harness-perl (<< 2.56-1), libtest-simple-perl (<< 0.62-1), liblocale-codes-perl (<< 2.06.1-1)
    Replaces: libpod-parser-perl, libansicolor-perl, libfile-temp-perl, libnet-perl, libattribute-handlers-perl, libcgi-pm-perl, libi18n-langtags-perl, liblocale-maketext-perl, libmath-bigint-perl, libnet-ping-perl, libtest-harness-perl, libtest-simple-perl, liblocale-codes-perl
    Provides: libpod-parser-perl, libansicolor-perl, libfile-temp-perl, libnet-perl, libattribute-handlers-perl, libcgi-pm-perl, libi18n-langtags-perl, liblocale-maketext-perl, libmath-bigint-perl, libnet-ping-perl, libtest-harness-perl, libtest-simple-perl, liblocale-codes-perl
    Installed-Size: 11736
  4. Repack the package:

    [root@pvclin47 perl-modules]# tar zcf control.tar.gz ./md5sums ./conffiles ./control
    [root@pvclin47 perl-modules]# ar r perl-modules_5.8.8-7etch6_all.vz.deb control.tar.gz
    
  5. Back up the original package and replace it with the newly created one:

    [root@pvclin47 perl-modules]# mv /vz/template/debian/4.0/x86/pm/archives/perl-modules_5.8.8-7etch6_all.vz.deb{,~}
    [root@pvclin47 perl-modules]# cp perl-modules_5.8.8-7etch6_all.vz.deb /vz/template/debian/4.0/x86/pm/archives/perl-modules_5.8.8-7etch6_all.vz.deb
    [root@pvclin47 perl-modules]#
    
  6. Re-run cache creation:

    [root@pvclin47 perl-modules]# vzpkg create cache debian-4.0-x86_64
    

NOTE: In the long-term, creating new containers on an outdated version of the Linux distribution is not recommended.

Search Words

failed created

asda

0c05f0c76fec3dd785e9feafce1099a9 d02f9caf3e11b191a38179103495106f e8e50b42231236b82df27684e7ec0beb 2897d76d56d2010f4e3a28f864d69223 5356b422f65bdad1c3e9edca5d74a1ae caea8340e2d186a540518d08602aa065 ac82ce33439a9c1feec4ff4f2f638899 2554725ed606193dd9bbce21365bed4e 614fd0b754f34d5efe9627f2057b8642 56797cefb1efc9130f7c48a7d1db0f0c

Email subscription for changes to this article
Save as PDF