How to re-install Cheetah?

Hello,

What would be the best way to re-install Cheetah? Recently updated the system and it seems Cheetah is now broken.

How I know it is broken:
Code:
[CMD=#] service sabnzbd start[/CMD]
The Python module Cheetah is required
[CMD]cheetah[/CMD]
Traceback (most recent call last):
  File "/usr/local/bin/cheetah", line 4, in <module>
    import pkg_resources
ImportError: No module named pkg_resources

How I have tried to re-install it
Code:
[CMD=/usr/ports/devel/py-cheetah #]make deinstall &&  make reinstall[/CMD]
===>  Deinstalling for devel/py-cheetah
===>   Deinstalling py27-cheetah-2.4.4
Traceback (most recent call last):
  File "/usr/local/bin/easy_install-2.7", line 5, in <module>
    from pkg_resources import load_entry_point
ImportError: No module named pkg_resources
pkg_delete: unexec command for '/usr/local/bin/easy_install-2.7 -q -N -m -S /usr/local/lib/python2.7/site-packages  -d /usr/local/lib/python2.7/site-packages  -s /usr/local/bin  Cheetah==2.4.4' failed
pkg_delete: couldn't entirely delete package `py27-cheetah-2.4.4'
(perhaps the packing list is incorrectly specified?)
===> Fetching all distfiles required by py27-cheetah-2.4.4 for building
===>  Extracting for py27-cheetah-2.4.4
=> SHA256 Checksum OK for Cheetah-2.4.4.tar.gz.
===>  Patching for py27-cheetah-2.4.4
===>   py27-cheetah-2.4.4 depends on file: /usr/local/bin/easy_install-2.7 - found
===>   py27-cheetah-2.4.4 depends on file: /usr/local/bin/python2.7 - found
===>  Configuring for py27-cheetah-2.4.4
Not using setuptools, so we cannot install the Markdown dependency
running config
===>  Building for py27-cheetah-2.4.4
Not using setuptools, so we cannot install the Markdown dependency
usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
   or: setup.py --help [cmd1 cmd2 ...]
   or: setup.py --help-commands
   or: setup.py cmd --help

error: invalid command 'setopt'
*** [easyinstall-setopt] Error code 1

Stop in /usr/ports/devel/py-cheetah.
*** [reinstall] Error code 1

Stop in /usr/ports/devel/py-cheetah.

I'm not sure what else to try. Any help is appreciated!
 
The first important detail to know is what version of FreeBSD you're using? Because that could make quite a difference.

Alas, I just tried to build this port myself and that doesn't give me any problems. So it's most certainly not the port itself (also because there aren't any options to configure).

When all else fails I'd resort to portmaster. Here the main port which you're using is news/sabnzbdplus, and not so much devel/py-cheetah. So I'd suggest to take it one step up the ladder: re-install news/sabnzbdplus and all its dependencies instead of concentrating on cheetah.

For example like this: # portmaster -Rf news/sabnzbdplus.

Then you can at least rule out that something else in the dependency chain is amiss. And speaking of dependencies, another reason to install ports-mgmt/portmaster: you might also want to run # portmaster --check-depends to check if all the dependencies in your ports collection are met.
 
I am currently running FreeBSD 9.1-RELEASE-p4.

Good idea, I'll re-install sabnzbd and see what happens.
 
Attempted to re-install sabnzbd

Code:
===>>> Starting check for runtime dependencies
===>>> Gathering dependency list for devel/py-distribute from ports
===>>> Dependency check complete for devel/py-distribute

===>>> sabnzbdplus-0.7.14 >> devel/py-cheetah >> py27-distribute-0.6.35 (25/32)

===>  Installing for py27-distribute-0.6.35

===>  py27-distribute-0.6.35 conflicts with installed package(s):
      py27-setuptools-0.6c11_3

      They install files into the same place.
      Please remove them first with pkg_delete(1).
*** [check-install-conflicts] Error code 1

Stop in /usr/ports/devel/py-distribute.

===>>> A backup package for py27-distribute-0.6.35 should
       be located in /usr/ports/packages/portmaster-backup

===>>> Installation of py27-distribute-0.6.35 (devel/py-distribute) failed
===>>> Aborting update

===>>> Update for py27-distribute-0.6.35 failed
===>>> Aborting update

===>>> Update for devel/py-cheetah failed
===>>> Aborting update

===>>> Killing background jobs
Terminated
===>>> The following actions were performed:
        Re-installation of libiconv-1.14_1
        Re-installation of libtool-2.4.2
        Re-installation of gettext-0.18.1.1_1
        Re-installation of python27-2.7.5_1
        Re-installation of gmake-3.82_1
        Re-installation of m4-1.4.16_1,1
        Re-installation of perl-5.14.4
        Re-installation of p5-Locale-gettext-1.05_3
        Re-installation of help2man-1.43.2
        Re-installation of autoconf-wrapper-20101119
        Re-installation of autoconf-2.69
        Re-installation of automake-wrapper-20101119
        Re-installation of automake-1.12.6
        Re-installation of tbb-4.1.3
        Re-installation of par2cmdline-tbb-20100203_8
        Re-installation of pkgconf-0.9.2_1
        Re-installation of xorg-macros-1.17
        Re-installation of xproto-7.0.24
        Re-installation of makedepend-1.0.4,1
        Re-installation of openssl-1.0.1_8
        Re-installation of unrar-4.20_1,5
        Re-installation of sqlite3-3.7.17_1
        Re-installation of py27-sqlite3-2.7.5_3


===>>> You can restart from the point of failure with this command line:
       portmaster <flags> news/sabnzbdplus devel/py-cheetah devel/py-distribute textproc/py-markdown devel/py-utils archivers/unzip news/py-yenc security/py-openssl textproc/py-feedparser textproc/py-chardet

===>>> Exiting

And below is what I get when I run

Code:
[CMD]portmaster --check-depends[/CMD]
>>> Missing package dependencies were detected.
>>> Found 11 issue(s) in total with your package database.

pkg: No packages matching 'lang/python27' has been found in the repositories
pkg: No packages matching 'devel/gettext' has been found in the repositories
pkg: No packages matching 'converters/libiconv' has been found in the repositories
pkg: No packages matching 'x11/xproto' has been found in the repositories
pkg: No packages matching 'lang/perl5.14' has been found in the repositories
pkg: No packages matching 'devel/pkgconf' has been found in the repositories
pkg: No packages matching 'devel/m4' has been found in the repositories
pkg: No packages matching 'databases/sqlite3' has been found in the repositories
pkg: No packages matching 'security/openssl' has been found in the repositories
pkg: No packages matching 'devel/py-setuptools' has been found in the repositories
pkg: No packages matching 'devel/py-cheetah' has been found in the repositories

Unable to find packages for installation.
 
zokstar said:
Attempted to re-install sabnzbd

Code:
===>>> Starting check for runtime dependencies

[B]---<CUT; for easier reading[/B]

===>>> sabnzbdplus-0.7.14 >> devel/py-cheetah >> py27-distribute-0.6.35 (25/32)

===>  Installing for py27-distribute-0.6.35

===>  py27-distribute-0.6.35 conflicts with installed package(s):
      py27-setuptools-0.6c11_3

      They install files into the same place.
      Please remove them first with pkg_delete(1).
*** [check-install-conflicts] Error code 1

Stop in /usr/ports/devel/py-distribute.
[B]---<CUT; for easier reading[/B]
Now that looks plain out bizarre to me, and immediately reminds me of the issues I once had with both print/ghostscript9 and print/ghostscript9-nox11, even though that doesn't seem to be directly related here.

Alas, I get the impression that you've been ignoring /usr/ports/UPDATING for a while:

20130305:
AFFECTS: users of devel/py-setuptools (i.e you)
AUTHOR: rm@FreeBSD.org

devel/py-setuptools was replaced with devel/py-distribute. Please do
the following according to package manager used. py-setuptools port
will be removed shortly.

# portmaster -o devel/py-distribute devel/py-setuptools
or
# portupgrade -fo devel/py-distribute devel/py-setuptools
or
# pkg set -o devel/py-setuptools:devel/py-distribute
# pkg install -f devel/py-distribute
That explains the error above.

So the first thing to do is to carry out this replacement. After that re-run the command I mentioned above to re-install news/sabnzbdplus and that should take care of this problem.

And if you missed that then I'm afraid you may also have missed this (from the same UPDATING file):

20130612:
AFFECTS: users of lang/perl* and any port that depends on it
AUTHOR: az@FreeBSD.org

lang/perl5.12 has been upgraded from version 5.12.4 to 5.12.5
lang/perl5.14 has been upgraded from version 5.14.2 to 5.14.4
lang/perl5.16 has been upgraded from version 5.16.2 to 5.16.3

The directory structure where Perl is installed has also been modified:
"major.minor" is now used instead of "major.minor.patchlevel".

The "perl-after-upgrade" script has been removed.

Please rebuild all Perl ports and all ports that depend on it:

# portmaster -r perl
or
# portupgrade -rf perl
or
# pkg install -fR perl
I'm mentioning Perl just in case, also because of those odd looking dependency problems (odd looking to me that is).

It could be explained because of several Python related packages becoming "corrupted" (to some degree) due to the dependency on one setup tool while the other is installed. However, in my experience Perl can also have a very big impact on things so I can't help wonder if that could have something to do with all this as well.

So summing up; my advice would be to replace devel/py-setuptools with devel/py-distribute and if you haven't done so already: rebuild Perl and everything that depends on it (that may take some time).

After that's all done and taken care of you can then continue to reinstall news/sabnzbdplus using the command I mentioned in my previous comment.

Hope this can help; if you need more information don't hesitate to ask.
 
Appreciate the reply back!

Below is what is happening now

Code:
[CMD]pkg set -o devel/py-setuptools:devel/py-distribute[/CMD]
Change origin from devel/py-setuptools to devel/py-distribute for all dependencies? [y/N]: y
pkg: sqlite: deps.name may not be NULL (pkgdb.c:3605)

Code:
[CMD]pkg install -f devel/py-distribute[/CMD]
Updating repository catalogue
pkg: [url]http://pkgbeta.FreeBSD.org/freebsd:9:x86:64/latest/digests.txz:[/url] Not Found
pkg: No digest falling back on legacy catalog format
repo.txz                                                                                     100% 1832     1.8KB/s   1.8KB/s   00:00
pkg: Repo "repo-packagesite" upgrade schema 2001 to 2002: Modify shlib tracking to add 'provided' capability
pkg: Repo "repo-packagesite" upgrade schema 2002 to 2003: Add abstract metadata capability
pkg: Repo "repo-packagesite" upgrade schema 2003 to 2004: Add manifest digest field
pkg: Repo "repo-packagesite" upgrade schema 2004 to 2005: Rename 'abstract metadata' to 'annotations'
pkg: No packages matching 'devel/py-distribute' has been found in the repositories

Clearly I've missed a step somewhere whilst setting up the OS?
 
Bit of an update, I was search these forums and came across someone else trying to install perl.

I ran portupgrade -fr perl which took about 15-20[]minutes. Everything seemed to go through ok (as far as I could tell).

Now when I run portmaster --check-depends it says that only two dependencies are missing.
 
Packages usually have the python version number in the name. Kind of annoying but it does make it clear if it's been built with Python 2.6 or 2.7. Try installing py27-distribute (note the py27).
 
So I think I have fixed my issue. After running portupgrade -fr perl I then tried to re-install sabnzbd. It kept coming up that py-yenc, py-feedparser and some others were already installed and to re-install. So I manually ran make deinstall then make install clean for each of the ones sabnzbd needed. I now have it up and running!

Thanks guys for the help, really appreciated it!
 
Back
Top