我已经安装了 openssl 和 openssl-dev,其中:
sudo apt-get install openssl
sudo apt-get install libssl-dev
Run Code Online (Sandbox Code Playgroud)
并通过这些安装 ffmpeg:
sudo add-apt-repository ppa:mc3man/trusty-media
sudo apt-get install ffmpeg
Run Code Online (Sandbox Code Playgroud)
现在我想启用 https 协议ffmpeg。我确实尝试过这些:
user@user-VirtualBox:~/ffmpeg_sources/ffmpeg$ ./configure --enable-openssl
Run Code Online (Sandbox Code Playgroud)
并将其列在Enabled protocols列表中。
之后运行这些命令:
make
make install
Run Code Online (Sandbox Code Playgroud)
但没有任何帮助。如果检查ffmpeg -protocols,https协议不会在那里列出。
我在 virtualbox 中使用 ubuntu,但我不太擅长。如果您能指导我如何openssl使用 ffmpeg 进行编译以启用 https 协议,我将非常感谢。谢谢。
我试图以相反的顺序获取命令行参数的输出。但是这样做时我遇到了错误。
这是代码:
#!/bin/bash
str=$@
len=$#
space=" "
echo "No. of arguments = $len"
echo "Entered arguments = $str"
while [ $len -ne 0 ]
do
tmp=`echo $str | cut -d " " f $len`
rev=$rev$tmp$space
len=`expr $len - 1`
done
echo "Arguments in reverse = $rev"
Run Code Online (Sandbox Code Playgroud)
当我运行脚本时,出现此错误:
robin@robin-VirtualBox:~/lx$ ./s1.sh one two three
No. of arguments = 3
Entered arguments = one two three
cut: you must specify a list of bytes, characters, or fields
Try 'cut --help' for more information. …Run Code Online (Sandbox Code Playgroud) 我正在尝试使用该wc命令获取字符串的字数。但它给了我不同的答案。它将单词数增加 1。
这是代码:
echo Enter a string:
read str
len=`echo $str | wc -c`
echo you have entered: $str
echo and the word count: $len
Run Code Online (Sandbox Code Playgroud)
输出是这样的:
Enter a string:
robin
you have entered: robin
and word count: 6
Run Code Online (Sandbox Code Playgroud)
我究竟做错了什么?请帮我解决这个问题。我将不胜感激。谢谢你。
我想将文件夹的内容colors从复制~/Downloads/vim-colorschemes-master到/etc/vim/colors. 我按照指示尝试了这个:
cp colors/* ~/etc/.vim/colors
Run Code Online (Sandbox Code Playgroud)
但我收到错误:
cp: target ‘/home/advenio/etc/.vim/colors’ is not a directory
Run Code Online (Sandbox Code Playgroud)
我该如何正确地做到这一点?