Workaround for ‘/usr/lib/rpm/debugedit: canonicalization unexpectedly shrank by one character’

There’s a bug in rpm package:

It causes the following error while building rpm packages:

/usr/lib/rpm/debugedit: canonicalization unexpectedly shrank by one

As a workaround you can use this command:

rpmbuild -bb rpmbuild/SPECS/package.spec -D 'debug_package %{nil}'

It will disable building of debug package and that’s it.

How to install Node.js rpm package on Centos 6

The repository with spec file as well as the installation description can be found at Github.

yum install gcc-c++ openssl-devel
wget -P ~/rpmbuild/SOURCES
wget -P ~/rpmbuild/SPECS

Modify spec file to match current version.

rpmbuild -ba ~/rpmbuild/SPECS/nodejs.spec
rpm -ivh rpmbuild/RPMS/x86_64/nodejs-0.8.21-1.x86_64.rpm

init.d script can be found here. You would also need to modify it for your application.