schematool: command not found

Viewed 2775

I am trying to install Hive on my Ubuntu 19.10 machine . I am using this doc https://phoenixnap.com/kb/install-hive-on-ubuntu. As mentioned in step 6, where I am trying to initiate Derby Database, I write the command in the right path : ~/apache-hive-3.1.2-bin/bin

schematool –initSchema –dbType derby

But I get this error :

schematool: command not found.

How can I resolve this please ?

4 Answers

I had the same question before. Maybe because of the wrong configuration files, like hive-site.xml, hive-env.sh. A blank space in my configuration file caused this error.

Default path for schematool is $HIVE_HOME/bin/schematool (/apache-hive-3.1.2-bin/bin/schematool in your case). Try to add this HIVE_HOME on your .bashrc file, worked for me.

    # Hive
    export HIVE_HOME=/<your hive path>
    export PATH=$PATH:$HIVE_HOME/bin

Try this

using this command I resolved this issue

hive --service schematool -dbType mysql -password hive -username hive -validate

run ./schematool –initSchema –dbType derby don't forget the ./

Related