3

Trying to install civi on a brand new Drupal 10 site (have used Civi for years and have installed before, but back in the Drupal 5, 6, 7 days without any of these new tools). I'm pretty well conditioned to do things through the web-interface, which means I'm struggling more than I should with these command line tools. So, I apologize if this is just totally obvious.

Trying to follow instructions on the Civi documentation to a T. My site seems to have the Civi packages downloaded. And I seem to have cli-tools (at least this is the confirmation I get when I try to reinstall).

But when I try to install, it does not find the cv command. Am I not pointing to the right place? I'm setting the base URL to the exact path that the URL shows when I click on "CiviCRM" on my site. But I have tried it with every possible variation of this path (with/without the civicrm, for example) and get the same problem.

Here's what I'm seeing in my command line screen:

Using version ^2024.01 for civicrm/cli-tools vsource4@s1002:~/www/www/edboost.org$ cv core:install --cms-base-url="https://[actual path to civicirm on website]" --db="mysql://machineuser:[pass]@[livedatabase]/vsource4_edboost2024_civicrm" -bash: cv: command not found

I would so appreciate any help you can provide! -tiffani

2 Answers 2

3

If you're using composer to get cv, then you'll probably need to give the full path to cv, e.g.

/path/to/drupal/vendor/civicrm/civicrm-cli-tools/bin/cv core:install ..etc..

(something like that - the cv file will be under vendor somewhere)

An alternative is use the cv download: https://github.com/civicrm/cv?tab=readme-ov-file#download, which has the advantage you can share it between multiple sites on the same server.

And you can still use the UI with civi+drupal10. Once you have all the files downloaded with composer, just enable the civicrm module from the UI list of drupal modules. It will then redirect to the UI installer.

2
  • Thank you! This is helpful. So, I tried to install with the UI, and everything looked good, but it doesn't seem to have worked. The Installer doesn't load and the only information I get is: Access Keys: System Status: Error I feel like, for a very quick second it looked like a more traditional screen, telling me I needed to set up a cron and configure other settings and then it changed to this. My sense is that I should uninstall and restart. But... Commented May 14 at 20:33
  • When I try to uninstall from the UI, I get this error: Exception: Cannot remove "/home/vsource4/www/www/edboost.org/web/sites/default/civicrm.settings.php". When I installed on UI, the one thing I had to fix was to make the civicrm.settings.php non-writable. Have toggled that on and off with no effect. The DB is still empty, so I know the install didn't work. Could I overwrite the installation by doing it again on the command line? Or am I missing something silly as I try to uninstall? I really just want a fresh try at it! Thank you!! Commented May 14 at 20:40
2

Building on Demerit's answer, I've been able to make some progress and present a partial answer to my first problem.

As I try to install, uninstall, do any of the things that I want to do, I keep hitting the same issue: I don't have permissions on settings.civicrm.php ... Ok, after some more poking around, this was in fact the error. I had not set write permissions on the directory holding the file (only the file itself) and once I corrected that, the reinstallation went through.

So, confirming that Demerit's answer, that I needed the path to use the cv tool was on point. Thank you!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.