
**Describe the unexpected behaviour**
Trying to install clickhouse in FreeBSD (pfsense firewall), following this [link ](https://clickhouse.com/#quick-start)

**How to reproduce**
1 - copy the ClickHouse file into pfsense from [here](https://builds.clickhouse.com/master/freebsd/clickhouse)
2 - chmod a+x ./clickhouse
3 - sudo ./clickhouse install

 **Which ClickHouse server version to use**
- 21.12.1.8928 (official build


**Error message and/or stacktrace**
Code: 107. DB::Exception: Cannot obtain path to the binary from /proc/self/exe, file doesn't exist. (FILE_DOESNT_EXIST) (version 21.12.1.8928 (official build))
![image](https://user-images.githubusercontent.com/14872281/148040641-26f23fc0-39e9-4dcd-97dc-860c9cdefb9b.png)


path.pop_back();
        fs::path binary_self_path(path);
#else
        fs::path binary_self_path = "/proc/self/exe";
#endif
        if (!fs::exists(binary_self_path))
            throw Exception(ErrorCodes::FILE_DOESNT_EXIST, "Cannot obtain path to the binary from {}, file doesn't exist",
                            binary_self_path.string());
        fs::path binary_self_canonical_path = fs::canonical(binary_self_path);
        
        
        fs::path prefix = options["prefix"].as<std::string>();
        fs::path bin_dir = prefix / options["binary-path"].as<std::string>();
        fs::path main_bin_path = bin_dir / "clickhouse";
        fs::path main_bin_tmp_path = bin_dir / "clickhouse.new";
        fs::path main_bin_old_path = bin_dir / "clickhouse.old";
        size_t binary_size = fs::file_size(binary_self_path);
        bool old_binary_exists = fs::exists(main_bin_path);
        bool already_installed = false;
        
        if (old_binary_exists && binary_self_canonical_path == fs::canonical(main_bin_path))
        {
            already_installed = true;
            fmt::print("ClickHouse binary is already located at {}\n", main_bin_path.string());
        }
        
        else if (old_binary_exists && binary_size == fs::file_size(main_bin_path))
        {
            fmt::print("Found already existing ClickHouse binary at {} having the same size. Will check its contents.\n",
                main_bin_path.string());