正确的方法来安装cakephp脚本v2.2.1? [英] right way to install cakephp-scripts for v2.2.1?

查看:207
本文介绍了正确的方法来安装cakephp脚本v2.2.1?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用ubuntu和按照说明使用'apt-get isntall cakephp-scripts'

I am using ubuntu and as per instruction I use 'apt-get isntall cakephp-scripts'

我使用最新的稳定版本的蛋糕v 2.2.1,但是当我运行蛋糕bake -app,我总是获得控制台v1.3.2

I am using latest stable release of cake v 2.2.1, but when I run cake bake -app , I always get console for v1.3.2

为什么我在cakephp v 2.2.1上获得CakePHP v1.3.2控制台

Why do I get CakePHP v1.3.2 Console on cakephp v 2.2.1

推荐答案

正如其他人已经指出的,来自库的CakePHP是v1.3.2,它不能与你的2.1一起使用。

As the others already pointed out, CakePHP from the repositories is v1.3.2 which doesn't work with your 2.1.

卸载( sudo apt-get remove cakephp-scripts )后,执行以下操作:

After uninstalling (sudo apt-get remove cakephp-scripts) it, do the following:


  1. 下载CakePHP 2.1并将其解压缩到全局可用(例如 / usr / share / php / cakephp /

  2. 检查权限: / usr / share / cakephp / ,所有子文件夹都应该可读, / usr /

  3. 现在将您的可执行文件从 / usr / bin /

  1. Download CakePHP 2.1 and extract it somewhere globally available (e.g. /usr/share/php/cakephp/
  2. Check the permissions: /usr/share/cakephp/ and all subfolders should be readable for everyone and /usr/share/cakephp/app/Console/cake should be executable.
  3. Now link your executable from /usr/bin/:

cd /usr/bin
ln -s /usr/share/php/cakephp/app/Console/cake cake


  • 您现在应该可以

  • You should now be able to use the right version of the script everywhere from the console.

    如果你想让蛋糕的版本切换到舒适的地方,你应该将源放在子文件夹中,即 /usr/share/php/cakephp/2.1/ 并链接到: ln -s 2.1 current 。现在您可以从 / usr / bin 链接到您的当前目录: ln -s / usr / share / php / cakephp / current / app / Console / cake cake 。如果你想切换版本,你唯一要做的是改变,当前链接到

    If you want to make the version of cake switchable comfortably, you should put the sources in a subfolder, i.e. /usr/share/php/cakephp/2.1/ and link there: ln -s 2.1 current. Now you can link from /usr/bin to your current directory: ln -s /usr/share/php/cakephp/current/app/Console/cake cake. If you ever want to switch versions, the only thing you have to do is to change, where current links to.

    这篇关于正确的方法来安装cakephp脚本v2.2.1?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

  • 查看全文
    登录 关闭
    扫码关注1秒登录
    发送“验证码”获取 | 15天全站免登陆