我正在尝试设置deepmind / dqn https://github.com/deepmind/dqn的环境,我运行./install_dependencies.sh进行安装
LuaJIT and Torch 7.0
nngraph
Xitari
AleWrap
首先。但是我得到了
/home/dqn/torch/bin/luajit: error while loading shared libraries: libreadline.so.7: cannot open shared object file: No such file or directory
- => Torch7 has been installed successfully
Installing nngraph ... /home/dqn/torch/bin/luajit: error while
loading shared libraries: libreadline.so.7: cannot open shared object
file: No such file or directory Error. Exiting.
install_dependencies.sh是:
# Install dependencies for Torch:
sudo apt-get update
sudo apt-get install -qqy build-essential
sudo apt-get install -qqy gcc g++
sudo apt-get install -qqy cmake
sudo apt-get install -qqy curl
sudo apt-get install -qqy libreadline-dev
sudo apt-get install -qqy git-core
sudo apt-get install -qqy libjpeg-dev
sudo apt-get install -qqy libpng-dev
sudo apt-get install -qqy ncurses-dev
sudo apt-get install -qqy imagemagick
sudo apt-get install -qqy unzip
sudo apt-get update
echo "==> Torch7's dependencies have been installed"
# Build and install Torch7
cd /tmp
rm -rf luajit-rocks
git clone https://github.com/torch/luajit-rocks.git
cd luajit-rocks
mkdir -p build
cd build
git checkout master; git pull
rm -f CMakeCache.txt
cmake .. -DCMAKE_INSTALL_PREFIX=$PREFIX -DCMAKE_BUILD_TYPE=Release
RET=$?; if [ $RET -ne 0 ]; then echo "Error. Exiting."; exit $RET; fi
make
RET=$?; if [ $RET -ne 0 ]; then echo "Error. Exiting."; exit $RET; fi
make install
RET=$?; if [ $RET -ne 0 ]; then echo "Error. Exiting."; exit $RET; fi
path_to_nvcc=$(which nvcc)
if [ -x "$path_to_nvcc" ]
then
cutorch=ok
cunn=ok
fi
# Install base packages:
$PREFIX/bin/luarocks install cwrap
$PREFIX/bin/luarocks install paths
$PREFIX/bin/luarocks install torch
$PREFIX/bin/luarocks install nn
[ -n "$cutorch" ] && \
($PREFIX/bin/luarocks install cutorch)
[ -n "$cunn" ] && \
($PREFIX/bin/luarocks install cunn)
$PREFIX/bin/luarocks install luafilesystem
$PREFIX/bin/luarocks install penlight
$PREFIX/bin/luarocks install sys
$PREFIX/bin/luarocks install xlua
$PREFIX/bin/luarocks install image
$PREFIX/bin/luarocks install env
echo ""
echo "=> Torch7 has been installed successfully"
echo ""
echo "Installing nngraph ... "
$PREFIX/bin/luarocks install nngraph
RET=$?; if [ $RET -ne 0 ]; then echo "Error. Exiting."; exit $RET; fi
echo "nngraph installation completed"
echo "Installing Xitari ... "
cd /tmp
rm -rf xitari
git clone https://github.com/deepmind/xitari.git
cd xitari
$PREFIX/bin/luarocks make
RET=$?; if [ $RET -ne 0 ]; then echo "Error. Exiting."; exit $RET; fi
echo "Xitari installation completed"
echo "Installing Alewrap ... "
cd /tmp
rm -rf alewrap
git clone https://github.com/deepmind/alewrap.git
cd alewrap
$PREFIX/bin/luarocks make
RET=$?; if [ $RET -ne 0 ]; then echo "Error. Exiting."; exit $RET; fi
echo "Alewrap installation completed"
echo
echo "You can run experiments by executing: "
echo
echo " ./run_cpu game_name"
echo
echo " or "
echo
echo " ./run_gpu game_name"
echo
echo "For this you need to provide the rom files of the respective games (game_name.bin) in the roms/ directory"
echo
当我测试代码./run_gpu {game_name}时,我得到了:
../torch/bin/luajit: error while loading shared libraries: libreadline.so.7: cannot open shared object file: No such file or directory
当我运行ldconfig -p | grep readline 我的版本低于6
libreadline.so.6 (libc6,x86-64) => /lib/x86_64-linux-gnu/libreadline.so.6
libreadline.so (libc6,x86-64) => /usr/lib/x86_64-linux-gnu/libreadline.so
libguilereadline-v-18.so.18 (libc6,x86-64) => /usr/lib/x86_64-linux-gnu/libguilereadline-v-18.so.18
libguilereadline-v-18.so (libc6,x86-64) => /usr/lib/x86_64-linux-gnu/libguilereadline-v-18.so
但是我无法通过以下方式安装libreadline7:sudo apt-get install libreadline7-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package libreadline7-dev
我该如何解决libreadline7的安装?
答案 0 :(得分:0)
这主要是由于蟒蛇造成的,请尝试从PATH中禁用它
答案 1 :(得分:0)
要解决此依赖性,您需要手动安装上述软件包。转到ubuntu商店并搜索软件包。
这将列出包装信息。单击包装说明中提供的超链接。在这种情况下:
单击您所在地区的任何链接。这将开始下载该软件包的debian文件。
一旦获得了debian文件,您只需使用dpkg命令进行安装
例如:
sudo dpkg -i Desktop / libreadline7_7.0-3_amd64.deb