I have the following equation:
$$ \sum_{i=1}^N \ln (d_i) d_i^{-x} = C \sum_{i=1}^N d_i^{-x} $$ where $C$ and $d_i$ are constants (known variables).
For $N=2$ the equation takes the form $$ \ln (d_1) d_1^{-x} + \ln (d_2) d_2^{-x} = C (d_1^{-x} + d_2^{-x}) $$ and it is possible to solve it analytically for $x$.
My question is whether it is possible to solve the first equation analytically for $N>2$. In general, this type of equation can be written as:
$$ \sum_{i=1}^N g(x_i) f(x_i) = C \sum_{i=1}^N f(x_i) $$
Edit: from @ancient mathematician we can rewrite $d_i$ to $e^{\lambda_i}$. Thus, the equation now is defined as
$$ \sum_{i=1}^N \lambda_i e^{-\lambda_i x} = C \sum_{i=1}^N e^{-\lambda_i x} $$ We can notice that the left part is the derivative of the right part, such as
$$ -\frac{d}{dx} \sum_{i=1}^N e^{-\lambda_i x} = C \sum_{i=1}^N e^{-\lambda_i x} $$ with $f(x) = \sum_{i=1}^N e^{-\lambda_i x}$ we have
$$ f'(x) + Cf(x) = 0 $$
The task is to find the $x$ from this equation.
Firstly, there are not convenient approaches to use the derivative in the described task.
In according with OP, the given equation can be presented in the form $\;g(\Lambda,x)=0,\;$ where $$h(\Lambda, x) =\sum\limits_{i=1}^N (C-\lambda_i)e^{-\lambda_ix} ,\quad \Lambda=\{\lambda_1, \lambda_2\dots\lambda_N\}=\{\ln d_1, \ln d_2\dots\ln d_N\}.\tag1$$
Let $\;\lambda_1\le\lambda_2\le\dots\le\lambda_N,\;$ then from the given equation should $$C\in(\lambda_1,\lambda_N).$$
If $\,N=2,\,$ then $$(C-\lambda_1)e^{(\lambda_2-\lambda_1)x}=\lambda_2-C,\quad x=\dfrac1{\lambda_2-\lambda_1}\ln\dfrac{\lambda_1-C}{C-\lambda_2}.\tag2$$
If $\;\forall (i)\rightarrow \dfrac{\lambda_i}C \in\mathbb Q\;$ and $\;\dfrac{\lambda_i}C=\dfrac{p_{\,i}}q,\;p_{\,i},q\in\mathbb N,\;$ then $$h(\Lambda,x) = C\sum\limits_{i=1}^N \dfrac{q-p_{\,i}}{q}\,\left(\large e^{^{-\frac {Cx}q}}\right)^{p_{\,i}}= P(y),\quad\text{where}\quad y=\large e^{^{-\frac {-Cx}q}}\tag3$$ and $\,P(y)\,$ is polynomial.
In the common case, approach $(3)$ can be used approximately.
Another way in the common case is a transformation of the inner exponents in $(1)$.
Let us present the inner exponents in the form of $$e^{-\lambda_i x}\approx p_i e^{-\lambda_1 x}+q_i e^{-\lambda_N x},\qquad (i=2,3,\dots N-1),$$ where $$p_i = \dfrac{\lambda_i - \lambda_N}{\lambda_1-\lambda_N} e^{(\lambda_1-\lambda_i)x^{prev}},\quad q_i = \dfrac{\lambda_1 - \lambda_i}{\lambda_1-\lambda_N} e^{(\lambda_N - \lambda_1)x^{prev}},$$ (see also WA plot), then we can get $(1)$ in the form of $$h(\Lambda,x)\approx Ae^{-\lambda_1 x}+Be^{-\lambda_N x}=0,$$ where $$A=C-\lambda_1+\sum_{i=2}^{N-1} p_i(C-\lambda_i),\quad B=C-\lambda_N + \sum_{i=2}^{N-1} q_i(C-\lambda_i).$$ Then $$e^{(\lambda_N-\lambda_1) x}=-\dfrac BA,$$ $$x=\dfrac1{\lambda_N-\lambda_1}\ln\left(-\dfrac BA\right).\tag4$$ Iterative applying of $(4)$ leads to the solution with arbitrary accuracy.