swift-init command not found
Introduction
When you run more command in linux terminal / console, you get the following error message
swift-init: command not found
or when using sudo you get the following error message
sudo: swift-init: command not found
Solutions to swift-init: command not found
How To Fix swift-init: command not found in Ubuntu / Debian / Kali Linux / Raspbian
In Ubuntu swift-init is provided by python3-swift package.
python3-swift is:
OpenStack Object Storage (code-named Swift) is open source software for creating redundant, scalable object storage using clusters of standardized servers to store petabytes of accessible data. It is not a file system or real-time data storage system, but rather a long-term storage system for a more permanent type of static data that can be retrieved, leveraged, and then updated if necessary. Primary examples of data that best fit this type of storage model are virtual machine images, photo storage, email storage and backup archiving. Having no central “brain” or master point of control provides greater scalability, redundancy and permanence.
Objects are written to multiple hardware devices in the data center, with the OpenStack software responsible for ensuring data replication and integrity across the cluster. Storage clusters can scale horizontally by adding new nodes. Should a node fail, OpenStack works to replicate its content from other active nodes. Because OpenStack uses software logic to ensure data replication and distribution across different devices, inexpensive commodity hard drives and servers can be used in lieu of more expensive equipment.
This package provides the Python 3 libraries that actually implement everything.
To fix this problem, we can install more using the command below.
sudo apt-get -y install python3-swift
This command might take some time to finish depending on your machine internet connection.
You can also use apt command to install python3-swift.
sudo apt -y install python3-swift
Or if you have aptitude installed you can use the following command.
sudo aptitude install python3-swift
Summary
In this tutorial we learn how to fix swift-init command not found error in Ubuntu / Debian / Kali Linux or Raspbian distribution.