Can one give an example of non-compact space $X$ which satisfies the following conditions:


* the countable union of compact subsets is relatively compact,
* for every closed noncompact subset $A$ of $X$ there is a positive lower semicontinuous function on $X$ which is bounded on every compact subset of $X$ but unbounded on $A$.


Thanks in advance for any help.



Topological space with some conditions
I believe such a space cannot exist for the following reason:


Suppose it does. By the second requirement, there should be an unbounded function $f: X \to (0, \infty)$, which is bounded on every compact set. This means we have countably many points $x\_1, x\_2, x\_3, \dots$ such that for each $n$ the inequality $f(x\_n)\ge n$ holds. The singletons $\lbrace x\_n\rbrace$ are finite sets, therefore compact. By the first requirement, the set $\lbrace x\_n| n\in\mathbb{N}\rbrace$ is therefore relatively compact and so its closure must be compact. But then $f$ is unbounded on a compact set, which is a contradiction.


